/* ==========================================================================
   DreamWeb — AURA design system
   Palette and component language taken from the AURA shot by DesWave:
   #030204 base, #401F44 deep violet, #9E98A1 / #C7C4CA text greys, with a
   violet→pink gradient on primary actions and soft radial "aura" blooms.
   ========================================================================== */

:root {
  --bg:            #030204;
  --bg-raise:      #0a0710;
  --panel:         rgba(24, 18, 30, 0.72);
  --panel-solid:   #14101b;
  --panel-2:       rgba(34, 26, 42, 0.6);
  --line:          rgba(158, 152, 161, 0.14);
  --line-strong:   rgba(158, 152, 161, 0.26);

  --violet:        #a78bfa;
  --violet-deep:   #401f44;
  --pink:          #f472b6;
  --pink-soft:     #f0a8d0;
  --cyan:          #67e8f9;
  --amber:         #fbbf24;

  --text:          #f5f3f7;
  --text-2:        #c7c4ca;
  --muted:         #9e98a1;
  --muted-2:       #666269;

  --grad:          linear-gradient(90deg, #a78bfa 0%, #e879b8 55%, #f472b6 100%);
  --grad-soft:     linear-gradient(135deg, rgba(167,139,250,.22), rgba(244,114,182,.16));

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --pill: 999px;

  --shadow:    0 24px 60px -24px rgba(0,0,0,.9);
  --glow:      0 0 40px -8px rgba(167,139,250,.45);
  --ease:      cubic-bezier(.22,.61,.36,1);

  --sidebar-w: 248px;
  --max:       1180px;
}

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

/* An inline `display` would otherwise beat the [hidden] attribute's UA rule,
   which silently leaves toggled-off panels on screen. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
               Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- ambient background ------------------------------------------------- */

.aura-field { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aura-field::before,
.aura-field::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px);
}
.aura-field::before {
  width: 60vw; height: 60vw; left: -18vw; top: -22vw;
  background: radial-gradient(circle, rgba(64,31,68,.85), transparent 68%);
}
.aura-field::after {
  width: 52vw; height: 52vw; right: -16vw; bottom: -24vw;
  background: radial-gradient(circle, rgba(167,139,250,.24), transparent 66%);
}
#particles { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .65; }

/* --- typography --------------------------------------------------------- */

h1, h2, h3, h4 { margin: 0 0 .4em; font-weight: 700; letter-spacing: -0.03em; line-height: 1.14; }
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.14rem; letter-spacing: -0.02em; }
h4 { font-size: .98rem; }
p  { margin: 0 0 1em; color: var(--text-2); }
a  { color: var(--violet); text-decoration: none; }
a:hover { color: var(--pink-soft); }

.eyebrow {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .2em; color: var(--pink); margin-bottom: .7rem; display: block;
}
.eyebrow.cyan   { color: var(--cyan); }
.eyebrow.violet { color: var(--violet); }
.muted    { color: var(--muted); }
.small    { font-size: .82rem; }
.tiny     { font-size: .74rem; }
.center   { text-align: center; }
.nowrap   { white-space: nowrap; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* --- layout ------------------------------------------------------------- */

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.stack   > * + * { margin-top: 1rem; }
.stack-s > * + * { margin-top: .5rem; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.tight { gap: .35rem; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: 18px; }
/* auto-fill, not auto-fit: with auto-fit a section holding a single dream
   collapses to one track and the card stretches the full width, which made a
   lone dream render as a metre-tall image. */
.grid.c2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.hide-mobile { display: initial; }

/* --- glass panels ------------------------------------------------------- */

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  box-shadow: var(--shadow);
}
.panel.lit::before {
  /* the horizontal light streak that sits on the AURA cards */
  content: ""; position: absolute; top: -1px; left: 22%; right: 22%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216,160,255,.85), transparent);
  box-shadow: 0 0 18px 2px rgba(190,120,255,.45);
}
.panel.flush { padding: 0; overflow: hidden; }
.panel.quiet { background: rgba(20,16,27,.5); box-shadow: none; }

hr.rule { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* --- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.35rem; border-radius: var(--pill);
  font-size: .92rem; font-weight: 600; letter-spacing: -0.01em;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,.045);
  color: var(--text); cursor: pointer; text-decoration: none;
  transition: transform .16s var(--ease), background .16s, border-color .16s, box-shadow .2s;
  white-space: nowrap;
}
.btn:hover { background: rgba(255,255,255,.09); color: var(--text); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }

.btn.primary {
  background: var(--grad); border-color: transparent; color: #14061a;
  box-shadow: 0 10px 34px -12px rgba(236,110,180,.85);
}
.btn.primary:hover { box-shadow: 0 14px 40px -10px rgba(236,110,180,.95); color: #14061a; }
.btn.light { background: #fff; color: #12040f; border-color: transparent; }
.btn.light:hover { background: #f2eef5; color: #12040f; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(248,113,113,.4); color: #fca5a5; }
.btn.danger:hover { background: rgba(248,113,113,.12); color: #fecaca; }
.btn.block { width: 100%; }
.btn.sm { padding: .44rem .9rem; font-size: .8rem; }
.btn.xs { padding: .3rem .68rem; font-size: .72rem; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }

.btn-icon {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border-radius: var(--pill); border: 1px solid var(--line);
  background: rgba(255,255,255,.04); color: var(--text-2); cursor: pointer;
}
.btn-icon:hover { background: rgba(255,255,255,.09); color: var(--text); }

/* --- chips & tags ------------------------------------------------------- */

.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .34rem .78rem; border-radius: var(--pill);
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  font-size: .78rem; color: var(--text-2); cursor: default; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
a.chip:hover, .chip.click:hover { background: rgba(167,139,250,.16); border-color: rgba(167,139,250,.4); color: var(--text); }
.chip.on { background: var(--grad-soft); border-color: rgba(167,139,250,.5); color: #fff; }
.chip.tiny { padding: .2rem .55rem; font-size: .68rem; }
.chip .x { opacity: .5; font-weight: 700; cursor: pointer; }
.chip .x:hover { opacity: 1; color: var(--pink); }

.chip[data-type="place"]   { border-color: rgba(103,232,249,.3); }
.chip[data-type="person"]  { border-color: rgba(244,114,182,.32); }
.chip[data-type="emotion"] { border-color: rgba(251,191,36,.3); }
.chip[data-type="object"]  { border-color: rgba(167,139,250,.34); }
.chip[data-type="color"]   { border-color: rgba(255,255,255,.22); }
.chip[data-type="phrase"]  { border-color: rgba(232,121,184,.45); background: rgba(232,121,184,.09); }

.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .16rem .55rem; border-radius: var(--pill);
  font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(255,255,255,.06); color: var(--muted); border: 1px solid var(--line);
}
.badge.private   { color: var(--muted-2); }
.badge.followers { color: var(--cyan);   border-color: rgba(103,232,249,.3); }
.badge.public    { color: var(--violet); border-color: rgba(167,139,250,.35); }
.badge.anonymous { color: var(--pink);   border-color: rgba(244,114,182,.35); }
.badge.draft     { color: var(--amber);  border-color: rgba(251,191,36,.35); }

/* --- forms -------------------------------------------------------------- */

label.field { display: block; margin-bottom: 1rem; }
label.field > span.lbl {
  display: block; font-size: .74rem; font-weight: 600; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted); margin-bottom: .45rem;
}
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=time], input[type=search], input[type=number], input[type=url],
select, textarea {
  width: 100%; padding: .78rem 1rem;
  background: rgba(8,6,12,.72); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r);
  font: inherit; font-size: .93rem; transition: border-color .16s, box-shadow .16s, background .16s;
}
textarea { min-height: 130px; resize: vertical; line-height: 1.65; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: rgba(167,139,250,.6);
  box-shadow: 0 0 0 3px rgba(167,139,250,.14);
  background: rgba(12,9,18,.85);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2.4rem; }
select option { background: #14101b; color: var(--text); }

.check { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; font-size: .88rem; color: var(--text-2); }
.check input { margin-top: .25rem; accent-color: var(--violet); width: 16px; height: 16px; flex: none; }

input[type=range] { width: 100%; accent-color: var(--pink); height: 22px; }

.err { color: #fca5a5; font-size: .8rem; margin-top: .35rem; }
.hint { color: var(--muted); font-size: .78rem; margin-top: .35rem; }

/* radio card group (privacy selector, dream type, onboarding) */
.opts { display: grid; gap: .55rem; }
.opts.inline { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.opt {
  display: flex; gap: .7rem; align-items: flex-start; cursor: pointer;
  padding: .8rem 1rem; border-radius: var(--r);
  border: 1px solid var(--line); background: rgba(255,255,255,.03);
  transition: border-color .16s, background .16s;
}
.opt:hover { border-color: var(--line-strong); background: rgba(255,255,255,.06); }
.opt input { margin-top: .28rem; accent-color: var(--violet); flex: none; }
.opt input:checked ~ .opt-body .opt-title { color: #fff; }
.opt:has(input:checked) { border-color: rgba(167,139,250,.55); background: var(--grad-soft); }
.opt-title { font-weight: 600; font-size: .9rem; display: block; }
.opt-desc  { font-size: .78rem; color: var(--muted); display: block; margin-top: .12rem; }

/* --- navigation --------------------------------------------------------- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: none; padding: 24px 16px;
  border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: rgba(6,4,10,.6); backdrop-filter: blur(20px);
  display: flex; flex-direction: column; gap: 6px;
}
.brand { display: flex; align-items: center; gap: .55rem; padding: 4px 10px 20px; text-decoration: none; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--grad);
  display: grid; place-items: center; font-size: 15px; box-shadow: var(--glow);
}
.brand .name { font-weight: 700; letter-spacing: -0.03em; font-size: 1.06rem; color: var(--text); }

.nav-link {
  display: flex; align-items: center; gap: .7rem;
  padding: .62rem .8rem; border-radius: var(--r-sm);
  color: var(--muted); font-size: .9rem; font-weight: 500; text-decoration: none;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: rgba(255,255,255,.055); color: var(--text); }
.nav-link.active { background: var(--grad-soft); color: #fff; }
.nav-link .ico { width: 18px; text-align: center; opacity: .9; flex: none; }
.nav-link .count {
  margin-left: auto; background: var(--pink); color: #1a0510;
  border-radius: var(--pill); font-size: .66rem; font-weight: 700;
  padding: .07rem .42rem; min-width: 18px; text-align: center;
}
.nav-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.sidebar .spacer { flex: 1 1 auto; }

.main { flex: 1 1 auto; min-width: 0; padding: 30px 26px 90px; }

.topbar { display: none; }

.mobile-nav { display: none; }

/* --- dream cards -------------------------------------------------------- */

.dream-card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background: var(--panel); backdrop-filter: blur(18px);
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
  text-decoration: none; color: inherit; height: 100%;
}
.dream-card:hover { transform: translateY(-3px); border-color: rgba(167,139,250,.4); box-shadow: 0 26px 60px -30px rgba(167,139,250,.5); }
.dream-visual { position: relative; aspect-ratio: 16/10; overflow: hidden; background: #0a0710; }
.dream-visual img, .dream-visual svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.dream-visual .veil { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(3,2,4,.85)); }
.dream-visual .corner { position: absolute; top: 10px; right: 10px; display: flex; gap: .3rem; }
.dream-body { padding: 15px 17px 17px; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.dream-title { font-size: 1.02rem; font-weight: 650; letter-spacing: -0.02em; color: var(--text); margin: 0; }
.dream-meta { display: flex; gap: .5rem; align-items: center; font-size: .74rem; color: var(--muted); flex-wrap: wrap; }
.dream-excerpt { font-size: .85rem; color: var(--muted); line-height: 1.55; margin: 0; }
.dream-foot { margin-top: auto; padding-top: .5rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* --- avatars ------------------------------------------------------------ */

.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: var(--grad-soft); border: 1px solid var(--line-strong);
  font-size: .8rem; font-weight: 700; color: #fff; text-decoration: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 76px; height: 76px; font-size: 1.5rem; }
.avatar.sm { width: 26px; height: 26px; font-size: .66rem; }
.avatar.anon { background: rgba(255,255,255,.05); color: var(--muted); border-style: dashed; }

/* --- stats -------------------------------------------------------------- */

.stat {
  padding: 16px; border-radius: var(--r); border: 1px solid var(--line);
  background: rgba(255,255,255,.032);
}
.stat .n { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.045em; line-height: 1.1;
           background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .13em; color: var(--muted); margin-top: .25rem; }

/* --- connection score --------------------------------------------------- */

.score { display: flex; align-items: center; gap: .6rem; }
.score .ring { position: relative; width: 46px; height: 46px; flex: none; }
.score .ring svg { transform: rotate(-90deg); display: block; }
.score .ring .val {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: .78rem; font-weight: 700; letter-spacing: -.03em;
}
.band-extraordinary { color: #fff; }
.band-strong        { color: var(--pink); }
.band-meaningful    { color: var(--violet); }
.band-some          { color: var(--cyan); }
.band-weak          { color: var(--muted); }

.reason {
  display: flex; gap: .6rem; padding: .6rem .8rem; border-radius: var(--r-sm);
  background: rgba(255,255,255,.032); border: 1px solid var(--line);
  font-size: .82rem; color: var(--text-2);
}
.reason .rl { color: var(--violet); font-weight: 600; flex: none; }

/* --- emotion / intensity meters ---------------------------------------- */

.meter { display: flex; gap: 3px; align-items: center; }
.meter i { width: 6px; height: 14px; border-radius: 2px; background: rgba(255,255,255,.1); display: block; }
.meter i.on { background: var(--grad); }

/* --- feed / comments ---------------------------------------------------- */

.comment { display: flex; gap: .7rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.comment:first-child { border-top: 0; }
.comment .cbody { flex: 1; min-width: 0; }
.comment .cname { font-weight: 600; font-size: .86rem; }
.comment .ctext { font-size: .88rem; color: var(--text-2); margin: .2rem 0 0; white-space: pre-wrap; word-wrap: break-word; }
.comment.reply { margin-left: 2.2rem; }

.reactions { display: flex; gap: .4rem; flex-wrap: wrap; }
.react {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .34rem .72rem; border-radius: var(--pill); cursor: pointer;
  border: 1px solid var(--line); background: rgba(255,255,255,.035);
  font-size: .76rem; color: var(--text-2); transition: all .15s;
}
.react:hover { border-color: rgba(167,139,250,.45); color: var(--text); }
.react.on { background: var(--grad-soft); border-color: rgba(244,114,182,.5); color: #fff; }
.react .glyph { font-size: .9rem; line-height: 1; }
.react .n { opacity: .65; font-variant-numeric: tabular-nums; }

/* --- notifications ------------------------------------------------------ */

.notif { display: flex; gap: .8rem; padding: .9rem 1rem; border-radius: var(--r);
         border: 1px solid var(--line); background: rgba(255,255,255,.03); align-items: flex-start; }
.notif.unread { border-color: rgba(167,139,250,.4); background: var(--grad-soft); }
.notif .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); margin-top: .5rem; flex: none; }

/* --- tables ------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.data th, table.data td { padding: .6rem .7rem; text-align: left; border-bottom: 1px solid var(--line); }
table.data th { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
table.data tr:hover td { background: rgba(255,255,255,.025); }

/* --- calendar ----------------------------------------------------------- */

.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal .dow { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); text-align: center; padding-bottom: .3rem; }
.cal .day {
  aspect-ratio: 1; border-radius: 9px; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: .76rem; color: var(--muted-2);
  background: rgba(255,255,255,.02); text-decoration: none; position: relative;
}
.cal .day.has { color: #fff; border-color: rgba(167,139,250,.45); background: var(--grad-soft); }
.cal .day.has:hover { border-color: var(--pink); }
.cal .day.blank { border-color: transparent; background: none; }
.cal .day .pip { position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--pink); }

/* --- timeline ----------------------------------------------------------- */

.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px;
                    background: linear-gradient(180deg, rgba(167,139,250,.5), rgba(244,114,182,.2), transparent); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item::before { content: ""; position: absolute; left: -23px; top: 8px; width: 9px; height: 9px;
                   border-radius: 50%; background: var(--violet); box-shadow: 0 0 12px rgba(167,139,250,.9); }

/* --- network ------------------------------------------------------------ */

/* Deep space with a faint violet haze, so the filaments have something to sit in. */
.net-stage {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(88, 56, 140, .30), transparent 70%),
    radial-gradient(ellipse 45% 40% at 22% 78%, rgba(56, 40, 110, .22), transparent 72%),
    radial-gradient(ellipse 40% 40% at 82% 20%, rgba(120, 60, 150, .18), transparent 74%),
    #020104;
}
#dreamweb-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#dreamweb-canvas.dragging { cursor: grabbing; }
.net-overlay { position: absolute; top: 14px; left: 14px; right: 14px; display: flex;
               justify-content: space-between; gap: .6rem; pointer-events: none; flex-wrap: wrap; }
.net-overlay > * { pointer-events: auto; }
.net-legend { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .72rem; color: var(--muted);
              background: rgba(6,4,10,.75); padding: .5rem .8rem; border-radius: var(--pill);
              border: 1px solid var(--line); backdrop-filter: blur(12px); }
.net-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: .3rem; }
.net-tip {
  position: absolute; max-width: 300px; padding: 12px 14px; border-radius: var(--r);
  background: rgba(10,7,16,.96); border: 1px solid rgba(167,139,250,.4);
  box-shadow: var(--shadow); font-size: .8rem; pointer-events: none; z-index: 5;
  opacity: 0; transition: opacity .12s;
}
.net-tip.show { opacity: 1; }

/* --- voice recorder ----------------------------------------------------- */

.recorder { padding: 18px; border-radius: var(--r); border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; display: inline-block; }
.rec-dot.live { animation: pulse 1.1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .35; transform: scale(.8);} }
#wave { width: 100%; height: 54px; display: block; border-radius: var(--r-sm); background: rgba(0,0,0,.35); }
.rec-time { font-variant-numeric: tabular-nums; font-size: 1.15rem; font-weight: 600; letter-spacing: -.02em; }
audio { width: 100%; height: 38px; filter: invert(1) hue-rotate(180deg) saturate(.6); border-radius: var(--pill); }

/* --- misc --------------------------------------------------------------- */

.empty { text-align: center; padding: 46px 22px; color: var(--muted); }
.empty .icon { font-size: 2.2rem; opacity: .5; margin-bottom: .7rem; }

.skeleton { border-radius: var(--r); background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04));
            background-size: 200% 100%; animation: shimmer 1.4s infinite; height: 16px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.flashes { position: fixed; top: 18px; right: 18px; z-index: 90; display: grid; gap: .5rem; max-width: 380px; }
.flash { padding: .8rem 1.1rem; border-radius: var(--r); background: rgba(14,10,20,.96);
         border: 1px solid var(--line-strong); font-size: .86rem; box-shadow: var(--shadow);
         animation: slidein .3s var(--ease); }
.flash.success { border-color: rgba(103,232,249,.45); }
.flash.error   { border-color: rgba(248,113,113,.5); color: #fecaca; }
@keyframes slidein { from { opacity: 0; transform: translateX(20px); } }

.modal-back { position: fixed; inset: 0; background: rgba(2,1,4,.8); backdrop-filter: blur(6px);
              z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal { max-width: 480px; width: 100%; }

.disclaimer {
  font-size: .76rem; color: var(--muted-2); line-height: 1.6;
  padding: .8rem 1rem; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: rgba(255,255,255,.02);
}

.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab { padding: .6rem 1rem; font-size: .86rem; color: var(--muted); text-decoration: none;
       border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: #fff; border-bottom-color: var(--pink); }

.searchbar { position: relative; }
.searchbar input { padding-left: 2.7rem; }
.searchbar .mag { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
           background: rgba(12,9,18,.98); border: 1px solid var(--line-strong); border-radius: var(--r);
           overflow: hidden; box-shadow: var(--shadow); }
.suggest a { display: block; padding: .55rem .9rem; font-size: .85rem; color: var(--text-2); text-decoration: none; }
.suggest a:hover, .suggest a.sel { background: rgba(167,139,250,.16); color: #fff; }

.page-head { margin-bottom: 24px; }
.page-head h1 { margin-bottom: .25rem; }

/* --- landing ------------------------------------------------------------ */

.hero { padding: 90px 0 60px; text-align: center; position: relative; }
.hero h1 { font-size: clamp(2.3rem, 6.5vw, 4.3rem); max-width: 15ch; margin: 0 auto .8rem; }
.hero p.sub { font-size: clamp(1rem, 1.7vw, 1.16rem); color: var(--text-2); max-width: 62ch; margin: 0 auto 2rem; }
.hero .cta { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .8; }
.landing-section { padding: 64px 0; border-top: 1px solid var(--line); }
.landing-nav { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; }

/* --- responsive --------------------------------------------------------- */

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { padding: 16px 16px 96px; }
  .hide-mobile { display: none; }

  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 50;
    background: rgba(6,4,10,.9); backdrop-filter: blur(18px);
  }

  .mobile-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: rgba(6,4,10,.94); backdrop-filter: blur(22px);
    border-top: 1px solid var(--line);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around; align-items: center;
  }
  .mobile-nav a {
    display: grid; place-items: center; gap: 2px; flex: 1;
    color: var(--muted); font-size: .58rem; text-decoration: none;
    text-transform: uppercase; letter-spacing: .07em; padding: 4px 0;
  }
  .mobile-nav a .ico { font-size: 1.05rem; }
  .mobile-nav a.active { color: #fff; }
  .mobile-nav a.add .ico {
    width: 42px; height: 42px; border-radius: 50%; background: var(--grad);
    display: grid; place-items: center; color: #14061a; margin-top: -18px;
    box-shadow: 0 8px 26px -6px rgba(236,110,180,.8); font-size: 1.2rem;
  }
  .panel { padding: 17px; border-radius: var(--r); }
  .flashes { left: 12px; right: 12px; max-width: none; }
  .hero { padding: 50px 0 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  #particles, #hero-canvas { display: none; }
}

@media print {
  .sidebar, .mobile-nav, .topbar, .aura-field, #particles, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .panel { border: 1px solid #ccc; background: #fff; }
}
