@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,600;1,9..144,400&family=Karla:wght@400;500;700&display=swap');

:root {
  --ink: #14101f;
  --ink2: #1b1530;
  --cream: #f2ead9;
  --violet: #b18bff;
  --violet-dim: #8f6fd6;
  --moon: #e8c47c;
  --rose: #e0a8c9;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ink);
  color: var(--cream);
  font-family: 'Karla', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
h1, h2, h3, .display { font-family: 'Fraunces', serif; font-weight: 500; }
a { color: var(--violet); }
.atmosphere {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60vw 60vw at 20% 10%, rgba(177,139,255,.16), transparent 60%),
    radial-gradient(50vw 50vw at 85% 30%, rgba(232,196,124,.10), transparent 60%),
    radial-gradient(70vw 50vw at 50% 100%, rgba(224,168,201,.10), transparent 60%);
}
canvas#sky { position: fixed; inset: 0; z-index: 0; }
main { position: relative; z-index: 1; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 1.5rem; }
.hero { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.moon-mark { font-size: 2.2rem; margin-bottom: .5rem; filter: drop-shadow(0 0 12px rgba(232,196,124,.5)); }
.eyebrow { text-transform: uppercase; letter-spacing: .25em; font-size: .72rem; opacity: .65; margin-bottom: .8rem; }
.hero h1 { font-size: clamp(3rem, 10vw, 5.5rem); margin: 0; background: linear-gradient(135deg, var(--cream), var(--violet) 70%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .sub { font-style: italic; opacity: .8; max-width: 34rem; margin-top: 1.2rem; line-height: 1.6; font-size: 1.05rem; }
.scrolldown { margin-top: 3rem; opacity: .45; font-size: .8rem; letter-spacing: .1em; }

section { padding: 5rem 0; }
section h2 { font-size: 1.9rem; margin-bottom: 1rem; }
.lede { opacity: .82; line-height: 1.75; font-size: 1.05rem; max-width: 42rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.1rem; margin-top: 2rem; }
.card {
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); border-radius: 16px;
  padding: 1.5rem; opacity: 0; transform: translateY(16px); transition: all .7s ease; --hue: var(--violet);
}
.card.in { opacity: 1; transform: none; }
.card h3 { margin: 0 0 .5rem; font-size: 1.15rem; color: var(--hue); }
.card p { margin: 0; opacity: .8; line-height: 1.55; font-size: .95rem; }

.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.tag { background: rgba(177,139,255,.12); border: 1px solid rgba(177,139,255,.3); color: var(--violet); padding: .35rem .85rem; border-radius: 999px; font-size: .85rem; }

.quote-box { border-left: 3px solid var(--moon); padding-left: 1.2rem; font-style: italic; opacity: .85; margin-top: 1.5rem; line-height: 1.7; }

footer { padding: 4rem 0 6rem; text-align: center; opacity: .5; font-size: .85rem; }
footer a { opacity: .8; }

/* ---- /us toolbox ---- */
.ubar { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.5rem 0 2rem; }
.ubar button { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); color: var(--cream); padding: .5rem 1rem; border-radius: 10px; font-family: 'Karla',sans-serif; cursor: pointer; }
.ubar button.active { background: var(--violet); color: var(--ink); border-color: var(--violet); }
.panel { display: none; }
.panel.active { display: block; }
.row { display: flex; gap: .6rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--violet); }
.row.done { opacity: .45; text-decoration: line-through; }
.form-row { display: flex; gap: .5rem; margin: 1rem 0; flex-wrap: wrap; }
.form-row input, .form-row select, .form-row textarea { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.15); color: var(--cream); padding: .6rem .8rem; border-radius: 8px; font-family: 'Karla',sans-serif; flex: 1; min-width: 140px; }
.form-row button { background: var(--violet); color: var(--ink); border: none; padding: .6rem 1.2rem; border-radius: 8px; font-weight: 700; cursor: pointer; }
.due { font-size: .8rem; opacity: .6; }
.status-pill { font-size: .75rem; padding: .2rem .6rem; border-radius: 999px; background: rgba(232,196,124,.15); color: var(--moon); }
.status-pill.done { background: rgba(150,220,150,.15); color: #9be29b; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.login-wrap form { display: flex; gap: .5rem; margin-top: 1rem; }
.login-wrap input { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15); color: var(--cream); padding: .7rem 1rem; border-radius: 10px; font-size: 1rem; }
.login-wrap button { background: var(--violet); color: var(--ink); border: none; padding: .7rem 1.4rem; border-radius: 10px; font-weight: 700; cursor: pointer; }
.err { color: var(--rose); margin-top: .8rem; font-size: .9rem; }

.ritual-link { display: inline-block; margin: .9rem 0 0; padding: .65rem 1.2rem; border-radius: 10px; background: rgba(232,196,124,.13); border: 1px solid rgba(232,196,124,.4); color: var(--moon); text-decoration: none; font-family: 'Karla',sans-serif; font-size: .9rem; transition: background .2s; }
.ritual-link:hover { background: rgba(232,196,124,.22); }

.panel .lede { margin-bottom: 0; }
.row {
  display: flex; gap: .7rem; align-items: center; padding: .85rem 1rem; margin: .5rem 0;
  border-bottom: none; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
  transition: background .2s, transform .2s;
}
.row:hover { background: rgba(255,255,255,.055); }
.row.done { opacity: .42; }
.row.done span { text-decoration: line-through; }
.empty-hint { opacity: .45; font-style: italic; padding: 1.2rem 0; border: 1px dashed rgba(255,255,255,.12); border-radius: 12px; text-align: center; margin-top: .5rem; }

.row .del { margin-left: auto; opacity: .4; cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 0 .3rem; flex-shrink: 0; }
.row .del:hover { opacity: 1; color: var(--rose); }
