:root {
  --bg: #0b0820;
  --ink: #f3f0ff;
  --muted: #a9a3c9;
  --glass: rgba(255, 255, 255, .06);
  --glass-2: rgba(255, 255, 255, .1);
  --line: rgba(255, 255, 255, .12);
  --violet: #8b5cf6;
  --indigo: #6366f1;
  --pink: #ec4899;
  --teal: #2dd4bf;
  --amber: #fbbf24;
  --grad: linear-gradient(135deg, #a78bfa 0%, #ec4899 50%, #2dd4bf 100%);
  --radius: 20px;
  --ease: cubic-bezier(.2, .9, .25, 1.15);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 16px/1.5 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }

/* ---------- animated background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: radial-gradient(1200px 800px at 50% -10%, #1d1450 0%, transparent 60%), var(--bg); }
.blob { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(80px); opacity: .45; mix-blend-mode: screen; will-change: transform; }
.b1 { background: radial-gradient(circle, #7c3aed, transparent 65%); top: -20vmax; left: -15vmax; animation: drift1 26s ease-in-out infinite alternate; }
.b2 { background: radial-gradient(circle, #db2777, transparent 65%); top: 10vmax; right: -25vmax; animation: drift2 32s ease-in-out infinite alternate; opacity: .32; }
.b3 { background: radial-gradient(circle, #0d9488, transparent 65%); bottom: -30vmax; left: 5vmax; animation: drift3 28s ease-in-out infinite alternate; opacity: .35; }
.b4 { background: radial-gradient(circle, #4f46e5, transparent 65%); bottom: -10vmax; right: -5vmax; animation: drift1 36s ease-in-out infinite alternate-reverse; opacity: .3; }
@keyframes drift1 { to { transform: translate(18vmax, 12vmax) scale(1.15) rotate(30deg); } }
@keyframes drift2 { to { transform: translate(-20vmax, 15vmax) scale(.9) rotate(-20deg); } }
@keyframes drift3 { to { transform: translate(15vmax, -18vmax) scale(1.2); } }
#stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.grain { position: absolute; inset: -50%; opacity: .07; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(4) infinite; }
@keyframes grain { 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

/* ---------- top bar & drawer ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; backdrop-filter: blur(18px) saturate(140%);
  background: linear-gradient(to bottom, rgba(11, 8, 32, .75), rgba(11, 8, 32, .25)); border-bottom: 1px solid rgba(255,255,255,.05); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 19px; letter-spacing: -.02em; }
.brand b { font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand img { filter: drop-shadow(0 0 10px rgba(167, 139, 250, .7)); animation: float 5s ease-in-out infinite; }
.icon-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--glass); cursor: pointer; transition: transform .25s var(--ease), background .2s, border-color .2s; }
.icon-btn:hover { background: var(--glass-2); border-color: rgba(167, 139, 250, .5); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.small { width: 34px; height: 34px; border-radius: 11px; }
.icon-btn.small svg { width: 18px; height: 18px; }
.icon-btn.spin svg { animation: spin .9s linear infinite; }

.drawer { position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; width: min(340px, 86vw); padding: 18px 16px calc(18px + var(--safe-b));
  background: rgba(17, 12, 44, .82); backdrop-filter: blur(24px); border-right: 1px solid var(--line);
  transform: translateX(-105%); transition: transform .45s var(--ease); display: flex; flex-direction: column; gap: 12px; }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-head h2 { margin: 0; font-size: 20px; }
.drawer ul { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.drawer li button { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px; border-radius: 14px;
  border: 1px solid transparent; background: var(--glass); cursor: pointer; transition: .25s var(--ease); }
.drawer li button:hover, .drawer li button.active { border-color: rgba(167, 139, 250, .45); background: rgba(139, 92, 246, .14); transform: translateX(4px); }
.drawer .em { font-size: 22px; }
.drawer .nm { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer .pc { font-size: 12px; color: var(--muted); }
.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(5, 3, 18, .55); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .35s; }
.scrim.open { opacity: 1; pointer-events: auto; }

/* ---------- layout ---------- */
main { max-width: 760px; margin: 0 auto; padding: 18px 16px calc(130px + var(--safe-b)); }
.view { animation: viewIn .6s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(18px) scale(.98); filter: blur(6px); } }
.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .08); }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 28px 4px 22px; }
.orb { width: 104px; height: 104px; margin: 0 auto 18px; border-radius: 30px; display: grid; place-items: center; position: relative;
  animation: float 6s ease-in-out infinite; }
.orb::before { content: ''; position: absolute; inset: -18px; border-radius: 50%; background: conic-gradient(from 0deg, #a78bfa, #ec4899, #2dd4bf, #a78bfa);
  filter: blur(28px); opacity: .55; animation: spin 8s linear infinite; }
.orb img { width: 100%; height: 100%; position: relative; }
.orb.small { width: 64px; height: 64px; border-radius: 20px; }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
h1 { font-size: clamp(30px, 6.5vw, 50px); line-height: 1.08; letter-spacing: -.035em; margin: 0 0 12px; font-weight: 800; }
.grad { background: var(--grad); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmerText 6s ease infinite; }
@keyframes shimmerText { 50% { background-position: 100% 100%; } }
.sub { color: var(--muted); margin: 0 auto; max-width: 520px; }

/* ---------- glowing composer ---------- */
.glow { position: relative; isolation: isolate; border-radius: 24px; padding: 2px; }
.glow::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--a, 0deg), rgba(167,139,250,.9), rgba(236,72,153,.9), rgba(45,212,191,.9), rgba(167,139,250,.9));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: rotateA 6s linear infinite; opacity: .55; transition: opacity .3s; }
.glow::after { content: ''; position: absolute; inset: 8px; z-index: -2; border-radius: inherit; background: conic-gradient(from var(--a, 0deg), #7c3aed, #db2777, #0d9488, #7c3aed);
  filter: blur(26px); opacity: .25; animation: rotateA 6s linear infinite; transition: opacity .3s; }
.glow:focus-within::before { opacity: 1; } .glow:focus-within::after { opacity: .5; }
.glow.busy::before { animation-duration: 1.2s; opacity: 1; } .glow.busy::after { animation-duration: 1.2s; opacity: .7; }
@property --a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes rotateA { to { --a: 360deg; } }
.composer { background: transparent; }
.composer textarea, .addbar textarea { width: 100%; resize: none; border: 0; outline: 0; background: rgba(16, 11, 40, .82); border-radius: 22px 22px 0 0;
  padding: 18px 18px 8px; font-size: 17px; line-height: 1.55; }
.composer textarea::placeholder, .addbar textarea::placeholder { color: #7d77a3; }
.composer-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px 12px;
  background: rgba(16, 11, 40, .82); border-radius: 0 0 22px 22px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.chip { border: 1px solid var(--line); background: var(--glass); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--muted);
  cursor: pointer; transition: .25s var(--ease); }
.chip:hover { color: var(--ink); border-color: rgba(236, 72, 153, .5); transform: translateY(-2px); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; border-radius: 16px; padding: 12px 20px;
  font-weight: 700; letter-spacing: -.01em; transition: transform .25s var(--ease), box-shadow .3s, filter .2s; position: relative; overflow: hidden; }
.btn.primary { color: #fff; background: linear-gradient(135deg, #8b5cf6, #ec4899 60%, #f97316); background-size: 200% 200%; animation: btnShift 5s ease infinite;
  box-shadow: 0 10px 30px -8px rgba(236, 72, 153, .6), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn.primary::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); animation: sheen 3.5s ease-in-out infinite; }
@keyframes sheen { 0%, 60% { left: -60%; } 100% { left: 130%; } }
@keyframes btnShift { 50% { background-position: 100% 50%; } }
.btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 16px 40px -10px rgba(236, 72, 153, .8); }
.btn:active { transform: scale(.95); }
.btn:disabled { filter: saturate(.4) brightness(.8); cursor: progress; }
.btn svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn.round { width: 48px; height: 48px; padding: 0; border-radius: 16px; flex: none; }
.btn.round:hover svg { transform: rotate(90deg); }
.btn.ghost { background: var(--glass); border: 1px solid var(--line); }
.btn.wide { width: 100%; }
.btn.loading span { opacity: .0; }
.btn.loading::before { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: #fff; animation: spin .7s linear infinite; }
.btn.loading svg { opacity: 0; }

/* ---------- recent lists on home ---------- */
.recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 26px; }
.recent h3 { grid-column: 1 / -1; margin: 0; font-size: 14px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.tile { text-align: left; padding: 16px; cursor: pointer; transition: transform .35s var(--ease), border-color .3s; animation: pop .5s var(--ease) both; }
.tile:hover { transform: translateY(-4px) rotate(-.5deg); border-color: rgba(167, 139, 250, .5); }
.tile .em { font-size: 28px; display: block; margin-bottom: 6px; }
.tile b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .bar { height: 5px; border-radius: 5px; background: rgba(255,255,255,.08); margin-top: 10px; overflow: hidden; }
.tile .bar i { display: block; height: 100%; background: var(--grad); border-radius: inherit; transition: width .6s var(--ease); }
.tile small { color: var(--muted); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.96); } }

/* ---------- list header ---------- */
.list-head { display: flex; gap: 16px; align-items: center; padding: 18px; position: relative; margin-bottom: 16px; }
.ring { position: relative; width: 66px; height: 66px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring .track { stroke: rgba(255, 255, 255, .1); }
.ring .bar { stroke: #a78bfa; stroke-dasharray: 119.4; stroke-dashoffset: 119.4; transition: stroke-dashoffset .9s var(--ease), stroke .5s;
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, .8)); }
.ring.full .bar { stroke: var(--teal); filter: drop-shadow(0 0 8px rgba(45, 212, 191, .9)); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; }
.ring.full span { animation: bounce .8s var(--ease); }
@keyframes bounce { 40% { transform: scale(1.35) rotate(-10deg); } }
.list-meta { flex: 1; min-width: 0; }
.list-meta h1 { font-size: clamp(22px, 5vw, 30px); margin: 0; outline: none; border-radius: 8px; overflow-wrap: anywhere; }
.list-meta h1:focus { background: rgba(255, 255, 255, .06); }
.list-meta p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.menu { position: absolute; right: 14px; top: 64px; z-index: 5; background: rgba(24, 17, 58, .96); border: 1px solid var(--line); border-radius: 14px; padding: 6px;
  min-width: 180px; box-shadow: 0 20px 50px rgba(0,0,0,.5); animation: pop .3s var(--ease); }
.menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; background: none; border: 0; border-radius: 10px; cursor: pointer; }
.menu button:hover { background: var(--glass-2); }
.menu .danger { color: #fb7185; }

/* ---------- tasks ---------- */
.tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: t; }
.task { counter-increment: t; display: flex; gap: 12px; align-items: flex-start; padding: 14px 12px 14px 14px; border-radius: 18px; position: relative;
  background: linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.03)); border: 1px solid var(--line); backdrop-filter: blur(16px);
  transition: transform .35s var(--ease), border-color .3s, background .4s, opacity .4s, box-shadow .3s; }
.task::before { content: counter(t, decimal-leading-zero); position: absolute; left: -2px; top: -9px; font-size: 10px; font-weight: 800; letter-spacing: .05em;
  padding: 1px 7px; border-radius: 99px; background: #1b1442; border: 1px solid var(--line); color: var(--muted); }
.task:hover { border-color: rgba(167, 139, 250, .4); box-shadow: 0 10px 30px -12px rgba(139, 92, 246, .5); }
.task.enter { animation: taskIn .7s var(--ease) both; }
.task.fresh { animation: taskIn .7s var(--ease) both, freshGlow 2.4s ease-out .4s; }
@keyframes taskIn { from { opacity: 0; transform: translateX(-24px) scale(.95); filter: blur(4px); } }
@keyframes freshGlow { 0%, 30% { border-color: rgba(45, 212, 191, .9); box-shadow: 0 0 0 4px rgba(45, 212, 191, .18), 0 0 40px rgba(45, 212, 191, .35); } }
.task.leaving { animation: taskOut .45s ease-in forwards; }
@keyframes taskOut { to { opacity: 0; transform: translateX(60px) scale(.9); height: 0; padding-block: 0; margin-block: -5px; } }
.task.dragging { opacity: .4; transform: scale(.98); }
.task.over { border-color: var(--pink); }
.check { flex: none; width: 28px; height: 28px; margin-top: 1px; border-radius: 10px; border: 2px solid rgba(167, 139, 250, .6); background: transparent; cursor: pointer;
  display: grid; place-items: center; transition: .3s var(--ease); position: relative; }
.check svg { width: 17px; height: 17px; stroke: #fff; stroke-width: 3; stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .4s ease .05s; }
.check:hover { transform: scale(1.1); border-color: var(--pink); }
.task.done .check { background: linear-gradient(135deg, #2dd4bf, #8b5cf6); border-color: transparent; box-shadow: 0 0 18px rgba(45, 212, 191, .6); }
.task.done .check svg { stroke-dashoffset: 0; }
.task.done .check::after { content: ''; position: absolute; inset: -4px; border-radius: 13px; border: 2px solid #2dd4bf; animation: ripple .6s ease-out forwards; }
@keyframes ripple { to { inset: -16px; opacity: 0; border-radius: 22px; } }
.body { flex: 1; min-width: 0; }
.text { font-weight: 600; outline: none; border-radius: 6px; overflow-wrap: anywhere; position: relative; display: inline; transition: color .4s;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 55% / 0 2px; }
.text:focus { background-color: rgba(255,255,255,.06); }
.task.done .text { color: var(--muted); background-size: 100% 2px; transition: color .4s, background-size .5s ease; }
.task.done { opacity: .62; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 5px; font-size: 13px; color: var(--muted); }
.prio { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 99px; }
.prio.high { background: rgba(244, 63, 94, .16); color: #fda4af; }
.prio.medium { background: rgba(251, 191, 36, .14); color: #fcd34d; }
.prio.low { background: rgba(45, 212, 191, .14); color: #5eead4; }
.mins:empty, .note:empty { display: none; }
.note { flex-basis: 100%; }
.del { flex: none; opacity: 0; width: 30px; height: 30px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; color: var(--muted); display: grid; place-items: center; transition: .2s; }
.del svg { width: 16px; height: 16px; }
.task:hover .del, .del:focus { opacity: 1; }
.del:hover { color: #fb7185; background: rgba(244, 63, 94, .12); }
@media (hover: none) { .del { opacity: .5; } }

.skeleton { height: 64px; border-radius: 18px; border: 1px solid var(--line); position: relative; overflow: hidden; background: rgba(255,255,255,.04);
  animation: pop .4s var(--ease) both; }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, .18), rgba(236, 72, 153, .14), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.thinking { text-align: center; color: var(--muted); padding: 10px; font-size: 14px; }
.thinking i { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--violet); animation: dot 1.2s infinite; }
.thinking i:nth-child(2) { animation-delay: .15s; background: var(--pink); } .thinking i:nth-child(3) { animation-delay: .3s; background: var(--teal); }
@keyframes dot { 40% { transform: translateY(-7px); opacity: 1; } 0%, 80%, 100% { opacity: .4; } }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* ---------- suggestions ---------- */
.suggest { margin-top: 22px; padding: 16px; }
.suggest-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.suggest h3 { margin: 0; font-size: 15px; }
.spark { display: inline-block; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; animation: twinkle 2.5s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: scale(1.4) rotate(45deg); } }
#suggestions { display: flex; flex-direction: column; gap: 8px; }
.sugg { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px dashed rgba(167, 139, 250, .35); background: rgba(139, 92, 246, .06);
  animation: pop .5s var(--ease) both; transition: .3s var(--ease); }
.sugg:hover { border-style: solid; background: rgba(139, 92, 246, .12); transform: translateX(3px); }
.sugg .st { flex: 1; min-width: 0; }
.sugg b { display: block; font-weight: 600; }
.sugg small { color: var(--muted); }
.sugg .add { flex: none; width: 36px; height: 36px; border-radius: 12px; border: 0; cursor: pointer; color: #fff; display: grid; place-items: center;
  background: linear-gradient(135deg, #8b5cf6, #ec4899); box-shadow: 0 6px 20px -6px rgba(236, 72, 153, .7); transition: transform .3s var(--ease); }
.sugg .add svg { width: 18px; height: 18px; }
.sugg .add:hover { transform: rotate(90deg) scale(1.1); }
.sugg.taken { animation: taskOut .45s ease-in forwards; }
.sugg .x { flex: none; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; }
.sugg .x svg { width: 16px; height: 16px; }

/* ---------- add bar ---------- */
.addbar { position: fixed; z-index: 15; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); width: min(728px, calc(100% - 24px));
  display: flex; }
.addbar > * { position: relative; }
.addbar textarea { border-radius: 22px 0 0 22px; padding: 14px 16px; max-height: 160px; font-size: 16px; }
.addbar .btn { margin: 0; border-radius: 0 22px 22px 0; height: auto; width: 60px; }
.addbar { background: rgba(16, 11, 40, .82); backdrop-filter: blur(20px); box-shadow: 0 20px 50px -10px rgba(0,0,0,.7); }
.addbar textarea { background: transparent; }

/* ---------- pin ---------- */
.pin { max-width: 380px; margin: 10vh auto 0; padding: 30px 24px; text-align: center; display: flex; flex-direction: column; gap: 14px; }
.pin h2 { margin: 0; }
.pin input { text-align: center; font-size: 22px; letter-spacing: .4em; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.25); outline: none; }
.pin input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139, 92, 246, .2); }
.err { color: #fb7185; min-height: 1.5em; margin: 0; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- toast ---------- */
.toast { position: fixed; z-index: 60; left: 50%; top: calc(76px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -30px) scale(.95); opacity: 0;
  width: max-content; max-width: min(560px, calc(100% - 32px)); padding: 12px 18px; border-radius: 16px; background: rgba(28, 20, 66, .92); backdrop-filter: blur(16px);
  border: 1px solid rgba(167, 139, 250, .4); box-shadow: 0 20px 50px rgba(0,0,0,.5); transition: .45s var(--ease); pointer-events: none; font-size: 14px; }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast.error { border-color: rgba(244, 63, 94, .6); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 520px) {
  .composer-row .btn.primary { width: 100%; }
  .list-head { padding: 14px; gap: 12px; }
  .ring { width: 56px; height: 56px; }
}
