:root {
  --bg-1: #c4d0dc;
  --bg-2: #a9b9c9;
  --side-1: #34485f;
  --side-2: #263649;
  --ink: #1f2f45;
  --ink-2: #44566e;
  --muted: #6b7d93;
  --teal: #3f8f98;
  --teal-hi: #62b3ba;
  --mint: #8fd0c2;
  --lav: #8d89c8;
  --navy: #2c3e55;
  --gold: #e0a43a;
  --glass: linear-gradient(150deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .26));
  --glass-line: rgba(255, 255, 255, .6);
  --clay: inset 1px 1px 0 rgba(255, 255, 255, .75), inset -3px -4px 10px rgba(36, 54, 78, .10), 12px 16px 32px rgba(36, 54, 78, .20), -6px -6px 18px rgba(255, 255, 255, .28);
  --clay-sm: inset 1px 1px 0 rgba(255, 255, 255, .8), inset -2px -3px 6px rgba(36, 54, 78, .10), 5px 8px 16px rgba(36, 54, 78, .18);
  --press: inset 3px 4px 8px rgba(36, 54, 78, .22), inset -2px -2px 6px rgba(255, 255, 255, .55);
  --r: 26px;
  --font: Nunito, "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font: 600 15px/1.5 var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(255, 255, 255, .55), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(141, 137, 200, .25), transparent 60%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
  background-attachment: fixed;
}
body::before {
  /* лёгкое зерно, чтобы фон не был пластиковым */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  mix-blend-mode: overlay;
  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");
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 800; }
p { margin: 0; }
img { display: block; max-width: 100%; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* ---------- каркас */

.frame {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 26px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 22px;
}

.side {
  position: sticky;
  top: 22px;
  height: calc(100vh - 44px);
  min-height: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 18px 18px;
  border-radius: 34px;
  background: linear-gradient(170deg, var(--side-1), var(--side-2));
  color: #e9f0f7;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .08), inset -4px -6px 16px rgba(0, 0, 0, .25), 14px 18px 36px rgba(30, 46, 66, .35);
}
.side-avatar {
  display: block;
  width: 132px;
  height: 132px;
  padding: 7px;
  border-radius: 50%;
  background: linear-gradient(145deg, #4a6180, #22324a);
  box-shadow: 6px 8px 18px rgba(0, 0, 0, .35), inset 2px 2px 3px rgba(255, 255, 255, .15);
}
.side-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.side-hi { margin: 14px 0 22px; font-size: 21px; font-weight: 800; }

.side-nav { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 18px;
  color: #c9d6e4;
  font-weight: 700;
  transition: background .2s, color .2s, transform .2s;
}
.side-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav a.is-active {
  color: var(--navy);
  background: linear-gradient(160deg, #e9f1f7, #b9cddd);
  box-shadow: inset 1px 1px 0 #fff, inset -2px -3px 6px rgba(36, 54, 78, .18), 4px 6px 14px rgba(0, 0, 0, .3);
}
.side-nav a.is-active svg { stroke: var(--teal); }
.badge {
  margin-left: auto;
  min-width: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--teal-hi);
  color: #fff;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .5);
}

.side-promo {
  margin-top: auto;
  width: 100%;
  padding: 16px 16px 18px;
  border-radius: 24px;
  text-align: center;
  background: linear-gradient(165deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .02));
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .1), inset -3px -4px 10px rgba(0, 0, 0, .25), 6px 8px 18px rgba(0, 0, 0, .25);
}
.side-promo img { width: 64px; height: auto; margin: -2px auto 8px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .3)); }
.side-promo-title { font-size: 16px; font-weight: 800; }
.side-promo-text { margin: 4px 0 12px; font-size: 13px; color: #b8c7d7; line-height: 1.35; }

.side-foot { width: 100%; margin-top: 14px; display: flex; flex-direction: column; gap: 6px; align-items: center; font-size: 12px; color: #a9bacb; }
.side-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.side-foot .link { color: #a9bacb; }
.status { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-ok { background: #7fe0b7; box-shadow: 0 0 8px #7fe0b7; }
.dot-warn { background: #f2b35a; box-shadow: 0 0 8px #f2b35a; }

.main { min-width: 0; padding-bottom: 40px; }

.top { display: flex; align-items: center; gap: 18px; margin: 6px 0 22px; }
.top-title {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -.01em;
  color: #d3dde7;
  text-shadow: 1px 1px 1px rgba(255, 255, 255, .95), -1px -1px 1px rgba(36, 54, 78, .5), 0 0 1px rgba(36, 54, 78, .2);
}
.top-search {
  flex: 1;
  max-width: 420px;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--clay-sm);
  color: var(--ink-2);
}
.top-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-weight: 700; }
.top-search kbd { font: 700 12px var(--font); padding: 1px 7px; border-radius: 7px; background: rgba(255, 255, 255, .5); color: var(--muted); }
.top-btn {
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: linear-gradient(160deg, var(--teal-hi), var(--teal));
  box-shadow: inset 1px 2px 2px rgba(255, 255, 255, .45), inset -2px -4px 8px rgba(0, 0, 0, .18), 6px 8px 16px rgba(40, 100, 110, .35);
  transition: transform .15s;
}
.top-btn:active { transform: scale(.94); }

/* ---------- общие элементы */

.card {
  position: relative;
  padding: 22px;
  border-radius: var(--r);
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--clay);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h3 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.h-ic { width: 28px; height: auto; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform .15s, filter .15s;
}
.pill svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.pill:active { transform: scale(.97); }
.pill.big { height: 54px; padding: 0 28px; font-size: 16px; }
.pill-teal {
  color: #fff;
  background: linear-gradient(180deg, #61b0b8, #3a848d);
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, .45), inset 0 -4px 8px rgba(0, 0, 0, .18), 0 8px 18px rgba(40, 100, 110, .35);
}
.pill-teal:hover { filter: brightness(1.06); }
.pill-glass {
  color: var(--ink);
  background: linear-gradient(160deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .32));
  box-shadow: var(--clay-sm);
}

.chip-btn {
  border: 0;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(160deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .4));
  box-shadow: var(--clay-sm);
}
.link { border: 0; background: none; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.count {
  display: inline-block;
  min-width: 26px;
  margin-left: 6px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  font-size: 13px;
  line-height: 24px;
  text-align: center;
  box-shadow: var(--press);
}

.sel {
  height: 38px;
  padding: 0 32px 0 14px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  background: rgba(255, 255, 255, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2344566e' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 13px center;
  box-shadow: var(--press);
  appearance: none;
  outline: none;
}

/* ---------- главная */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: end;
  min-height: 250px;
  margin-bottom: 22px;
  padding: 0 34px 0 10px;
  border-radius: 30px;
  overflow: hidden;
  color: #eef4f9;
  background:
    repeating-linear-gradient(92deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 9px),
    linear-gradient(165deg, #4d6280, #33465f 60%, #2b3c52);
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .1), inset -6px -10px 24px rgba(0, 0, 0, .25), 14px 18px 36px rgba(30, 46, 66, .32);
}
.hero::after {
  /* полка внизу баннера, как на рефе */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 20px;
  background: linear-gradient(180deg, #5a7090, #3a4e68);
  box-shadow: 0 -3px 8px rgba(0, 0, 0, .3);
}
.hero-img { position: relative; z-index: 1; width: 300px; height: auto; margin-top: 16px; margin-bottom: 14px; filter: drop-shadow(10px 14px 18px rgba(0, 0, 0, .35)); }
.hero-text { position: relative; z-index: 2; padding: 34px 0 54px 10px; align-self: center; }
.hero-text h2 { font-size: clamp(24px, 3vw, 34px); line-height: 1.15; text-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.hero-text p { margin-top: 8px; font-size: 17px; color: #c9d8e6; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-plant { position: absolute; right: 28px; top: 26px; width: 96px; height: auto; opacity: .9; filter: drop-shadow(6px 10px 12px rgba(0, 0, 0, .35)); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.stat {
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 18px 20px;
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: var(--clay);
  transition: transform .2s;
}
.stat:hover { transform: translateY(-3px); }
.stat.mint { background: linear-gradient(160deg, #c9ece3, #8acdbf); }
.stat.frost { background: linear-gradient(160deg, #eef3f8, #c8d6e3); }
.stat.ice { background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .9), transparent 40%), radial-gradient(circle at 80% 70%, rgba(255, 255, 255, .6), transparent 35%), linear-gradient(160deg, #e3eef7, #b6cfe2); }
.stat.lav { background: linear-gradient(160deg, #c7c4ec, #8f8bca); }
.stat-ic {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: auto;
  border-radius: 18px;
  background: rgba(255, 255, 255, .45);
  box-shadow: var(--clay-sm);
}
.stat-ic img { width: 38px; height: auto; }
.stat-label { margin-top: 16px; font-weight: 800; font-size: 15px; }
.stat-value { font-size: 36px; font-weight: 900; line-height: 1.1; }
.stat-sub { font-size: 13px; color: var(--ink-2); }
.stat.mint .stat-sub, .stat.frost .stat-sub { color: #2f7f74; }

.capture-card { margin-bottom: 22px; }

.duo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; margin-bottom: 22px; }

.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .4); box-shadow: var(--press); }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; color: var(--muted); }
.seg button.is-on { color: var(--ink); background: linear-gradient(160deg, #fff, #dfe8f0); box-shadow: var(--clay-sm); }

.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; height: 200px; align-items: end; padding: 0 4px; }
.bar-col { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; }
.bar-col small { font-size: 13px; color: var(--ink-2); font-weight: 800; }
.bar-col.is-today small { color: var(--teal); }
.bar {
  position: relative;
  width: 100%;
  max-width: 38px;
  height: calc(14px + var(--v) * 150px);
  border-radius: 14px 14px 10px 10px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 72%, #1f2f45) 0%, var(--c) 30%, color-mix(in srgb, var(--c) 70%, #fff) 48%, var(--c) 66%, color-mix(in srgb, var(--c) 75%, #1f2f45) 100%);
  box-shadow: inset 0 3px 3px rgba(255, 255, 255, .45), 4px 6px 12px rgba(36, 54, 78, .25);
  transition: height .5s cubic-bezier(.2, .8, .2, 1);
}
.bar span { position: absolute; top: -20px; left: 0; right: 0; text-align: center; font-size: 12px; font-weight: 800; color: var(--ink-2); }

.donut-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.donut {
  position: relative;
  width: 170px;
  height: 170px;
  flex: none;
  border-radius: 50%;
  box-shadow: 8px 10px 20px rgba(36, 54, 78, .28), inset 2px 3px 4px rgba(255, 255, 255, .4), inset -4px -6px 10px rgba(0, 0, 0, .18);
}
.donut span {
  position: absolute;
  inset: 24%;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  font-size: 12px;
  color: var(--muted);
  background: linear-gradient(150deg, #d5dfe8, #b9c8d6);
  box-shadow: inset 4px 5px 10px rgba(36, 54, 78, .3), inset -2px -2px 4px rgba(255, 255, 255, .6);
}
.donut b { font-size: 22px; color: var(--ink); line-height: 1; }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 150px; display: grid; gap: 8px; }
.legend li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.legend i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 1px 1px 1px rgba(255, 255, 255, .5), 1px 2px 3px rgba(0, 0, 0, .2); }
.legend b { margin-left: auto; }

.recent-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .5); }
.recent-row:first-of-type { border-top: 0; }
.recent-thumb {
  width: 54px;
  height: 54px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 16px;
  box-shadow: var(--clay-sm);
  background: linear-gradient(160deg, #f4f7fa, #cbd8e4);
}
.recent-thumb.t-idea { background: linear-gradient(160deg, #e6e4f7, #b4b0e0); }
.recent-thumb.t-quote { background: linear-gradient(160deg, #def3ee, #a3dacd); }
.recent-thumb.t-action { background: linear-gradient(160deg, #d6ecee, #8fc4c9); }
.recent-thumb img { width: 34px; height: auto; }
.recent-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.recent-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 700; line-height: 1.35; }
.recent-body small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.play {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(160deg, #6ab6bd, #3a848d);
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, .45), 0 4px 10px rgba(40, 100, 110, .35);
}
.play svg { width: 16px; height: 16px; fill: currentColor; stroke: none; margin-left: 2px; }
.play.big { width: 54px; height: 54px; }

.mix {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 300px;
  overflow: hidden;
  padding: 0;
  background: linear-gradient(170deg, #f6e9da, #e7c9a8 70%, #d9b28c);
}
.mix-art { position: absolute; inset: 0 0 30% 0; display: grid; place-items: center; }
.mix-art img { width: 62%; max-width: 260px; height: auto; filter: drop-shadow(10px 14px 16px rgba(80, 50, 20, .3)); transition: transform .4s; }
.mix:hover .mix-art img { transform: translateY(-4px) rotate(-2deg); }
.mix-body { position: relative; padding: 20px 90px 22px 22px; color: #fff; background: linear-gradient(180deg, transparent, rgba(60, 38, 20, .55)); }
.mix-kicker { font-size: 13px; opacity: .85; }
.mix-body b { display: block; font-size: 24px; font-weight: 900; line-height: 1.15; text-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.mix-body p { margin-top: 6px; font-size: 13px; line-height: 1.35; opacity: .95; }
.mix .play { position: absolute; right: 20px; bottom: 22px; }

.strip {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  border-radius: var(--r);
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--clay);
}
.strip-ic { width: 54px; height: auto; filter: drop-shadow(3px 6px 8px rgba(36, 54, 78, .25)); }
.strip span { display: flex; flex-direction: column; }
.strip small { color: var(--muted); }
.strip .pill { margin-left: auto; }

/* ---------- быстрый ввод */

.capture { display: flex; flex-direction: column; gap: 12px; }
.capture-types { display: flex; gap: 8px; flex-wrap: wrap; }
.type-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px 0 8px;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .45);
  box-shadow: var(--clay-sm);
  transition: transform .15s, background .2s;
}
.type-chip .ti { width: 24px; height: 24px; object-fit: contain; }
.type-chip:hover { transform: translateY(-1px); }
.type-chip.is-on { color: var(--ink); background: linear-gradient(160deg, #fff, #d6e3ee); box-shadow: var(--press); }
.type-chip.t-idea.is-on { background: linear-gradient(160deg, #ecebfa, #c3c0ea); }
.type-chip.t-quote.is-on { background: linear-gradient(160deg, #e5f6f2, #b2e1d6); }
.type-chip.t-action.is-on { background: linear-gradient(160deg, #e0f1f2, #a5d1d5); }

.capture textarea, .note-edit textarea, .side-card textarea {
  width: 100%;
  min-height: 58px;
  padding: 14px 18px;
  border: 0;
  border-radius: 20px;
  resize: none;
  outline: none;
  font-size: 16px;
  line-height: 1.5;
  background: rgba(255, 255, 255, .55);
  box-shadow: var(--press);
  transition: background .2s;
}
.capture textarea:focus, .note-edit textarea:focus, .side-card textarea:focus { background: rgba(255, 255, 255, .8); }
.side-card textarea { resize: vertical; font-size: 14px; }
.capture-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.capture-row select {
  max-width: 260px;
  height: 40px;
  padding: 0 32px 0 14px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  background: rgba(255, 255, 255, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2344566e' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 13px center;
  box-shadow: var(--press);
  appearance: none;
  outline: none;
  text-overflow: ellipsis;
}
.capture-page {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  padding: 0 4px 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  box-shadow: var(--press);
  color: var(--muted);
  font-weight: 800;
}
.capture-page input { width: 56px; border: 0; background: none; outline: none; font-weight: 800; color: var(--ink); }
.capture-hint { font-size: 12px; color: var(--muted); }
.capture-save { margin-left: auto; height: 42px; }
.btn {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  background: linear-gradient(160deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .4));
  box-shadow: var(--clay-sm);
}
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #61b0b8, #3a848d);
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, .45), inset 0 -4px 8px rgba(0, 0, 0, .18), 0 6px 14px rgba(40, 100, 110, .3);
}
.btn-danger { background: none; box-shadow: none; color: #b5463b; padding: 0 6px; }

/* ---------- заметки */

.notes { display: flex; flex-direction: column; gap: 14px; }
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }

.note {
  position: relative;
  padding: 16px 18px 12px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--clay-sm);
  transition: transform .2s, box-shadow .2s;
}
.note:hover { box-shadow: var(--clay); }
.note.is-star { background: linear-gradient(150deg, rgba(255, 248, 230, .85), rgba(255, 255, 255, .35)); }
.note-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.note-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px 2px 4px;
  border-radius: 999px;
  font-weight: 800;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .6);
  box-shadow: var(--press);
}
.note-type .ti { width: 20px; height: 20px; object-fit: contain; }
.note-page { font-weight: 800; }
.note-book { font-weight: 800; color: var(--teal); }
.note-date { margin-left: auto; }
.note-text { font-size: 16px; line-height: 1.55; font-weight: 600; overflow-wrap: anywhere; }
.note.t-quote .note-text { padding-left: 16px; border-left: 4px solid var(--mint); font-style: italic; color: var(--ink-2); }
.note.t-idea .note-text { font-weight: 800; }
.note.t-question .note-text::before { content: "? "; color: var(--lav); font-weight: 900; }
.note-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.note-check input, .todo input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--teal); }
.note.is-done .note-text { color: var(--muted); text-decoration: line-through; }

mark { background: linear-gradient(180deg, transparent 50%, rgba(143, 208, 194, .9) 50%); color: inherit; padding: 0 2px; border-radius: 3px; }
.tag { color: var(--teal); font-weight: 800; }
.tag:hover { text-decoration: underline; }

.note-actions {
  position: absolute;
  right: 10px;
  bottom: 8px;
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 12px;
  background: rgba(236, 242, 248, .85);
  box-shadow: var(--clay-sm);
  opacity: 0;
  transition: opacity .2s;
}
.note { padding-bottom: 16px; }
@media (hover: none) {
  .note { padding-bottom: 50px; }
  .note-actions { background: none; box-shadow: none; }
}
.note:hover .note-actions, .note:focus-within .note-actions { opacity: 1; }
.na {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font-size: 16px;
  transition: background .15s, color .15s;
}
.na:hover { background: rgba(255, 255, 255, .6); color: var(--ink); }
.na-star[aria-pressed="true"] { color: var(--gold); text-shadow: 0 1px 4px rgba(224, 164, 58, .6); }
.na-del:hover { color: #b5463b; }
@media (hover: none) { .note-actions { opacity: 1; } }

.note-edit { display: flex; flex-direction: column; gap: 10px; }

/* ---------- библиотека */

.shelf { margin-bottom: 30px; }
.shelf-title { display: flex; align-items: center; margin-bottom: 14px; font-size: 20px; color: var(--ink-2); }
.book-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.book-card { display: flex; gap: 18px; align-items: stretch; transition: transform .2s; }
.book-card:hover { transform: translateY(-3px); }
.book-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.book-card-body b { font-size: 18px; line-height: 1.25; }
.book-card-meta { margin-top: auto; font-size: 13px; color: var(--muted); }

.cover {
  position: relative;
  width: 104px;
  min-height: 148px;
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 10px 10px 16px;
  border-radius: 10px 18px 18px 10px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(155deg, hsl(var(--h) 45% 72%), hsl(calc(var(--h) + 30) 38% 48%));
  box-shadow: inset 6px 0 0 rgba(0, 0, 0, .12), inset 7px 0 0 rgba(255, 255, 255, .25), inset 2px 2px 2px rgba(255, 255, 255, .45), inset -4px -6px 10px rgba(0, 0, 0, .2), 8px 10px 18px rgba(36, 54, 78, .3);
}
.cover-title { font-size: 13px; font-weight: 900; line-height: 1.15; text-shadow: 0 1px 3px rgba(0, 0, 0, .25); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.cover-author { font-size: 10px; opacity: .85; }
.cover.big { width: 150px; min-height: 214px; padding: 18px 14px 14px 22px; }
.cover.big .cover-title { font-size: 18px; }
.cover.big .cover-author { font-size: 12px; }

.prog { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.prog-track { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .5); box-shadow: var(--press); overflow: hidden; }
.prog-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(180deg, #8fd8cb, #3f8f98); box-shadow: inset 0 2px 2px rgba(255, 255, 255, .5); }
.prog span, .prog-text { font-size: 13px; color: var(--muted); font-weight: 800; }

.add-card {
  width: 100%;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 2px dashed rgba(255, 255, 255, .7);
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-2);
}
.add-card span { font-size: 28px; }

/* ---------- страница книги */

.book-hero { display: flex; gap: 28px; align-items: center; margin-bottom: 22px; }
.book-hero-body { flex: 1; min-width: 0; }
.book-hero h2 { font-size: clamp(24px, 3vw, 34px); line-height: 1.15; }
.book-authors { margin-top: 4px; font-size: 16px; color: var(--ink-2); }
.book-meta { display: flex; gap: 10px; margin: 14px 0 4px; flex-wrap: wrap; }
.book-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.book-btns .pill { height: 40px; padding: 0 16px; font-size: 14px; }

.book-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.book-main { min-width: 0; }
.book-side { display: flex; flex-direction: column; gap: 18px; }
.side-card { padding: 18px; }

.fchips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.fchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .4);
  box-shadow: var(--clay-sm);
}
.fchip b { font-size: 12px; color: var(--muted); }
.fchip.is-on { background: linear-gradient(160deg, #61b0b8, #3a848d); color: #fff; box-shadow: inset 0 2px 2px rgba(255, 255, 255, .4), 0 4px 10px rgba(40, 100, 110, .3); }
.fchip.is-on b { color: #d9f1f3; }
.fchip-ic { width: 22px; height: 22px; object-fit: contain; }

.key-list { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-weight: 700; line-height: 1.4; }
.key-list li::marker { color: var(--gold); font-weight: 900; }
.todo, .q-list, .sessions { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.todo label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.todo input:checked + span { color: var(--muted); text-decoration: line-through; }
.q-list li { padding-left: 14px; position: relative; }
.q-list li::before { content: "?"; position: absolute; left: 0; color: var(--lav); font-weight: 900; }
.sessions li { display: flex; align-items: center; gap: 10px; }
.sessions small { color: var(--muted); }
.sessions .x { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 16px; }

/* ---------- заметки */

.filters { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.filters .fchips { margin: 0; }
.filters .sel { align-self: flex-start; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-chip { padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; color: var(--teal); background: rgba(255, 255, 255, .5); }
.tag-chip b { margin-left: 4px; color: var(--muted); font-size: 11px; }
.tag-chip.is-on { background: var(--teal); color: #fff; }
.found { margin: 0 0 14px 4px; color: var(--muted); font-weight: 800; }

/* ---------- повторение */

.review { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.review-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--ink-2); font-weight: 800; flex-wrap: wrap; }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .5); box-shadow: var(--press); }
.dots i.done { background: var(--teal); box-shadow: none; }
.dots i.now { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.review-card { min-height: 320px; display: flex; flex-direction: column; gap: 18px; padding: 34px 38px; border-radius: 34px; }
.review-type { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; color: var(--ink-2); font-size: 16px; }
.review-type img { width: 44px; height: auto; }
.review-text { font-size: clamp(20px, 2.6vw, 28px); line-height: 1.4; font-weight: 800; flex: 1; }
.review-card.t-quote .review-text { font-style: italic; }
.review-src { color: var(--teal); font-weight: 800; }
.review-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.review-done { max-width: 520px; margin: 30px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px; }
.review-done img { width: 90px; height: auto; filter: drop-shadow(4px 8px 10px rgba(36, 54, 78, .3)); }
.review-done h2 { font-size: 28px; }
.review-done .pill { margin-top: 10px; }

.empty { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px; }
.empty img { width: 220px; height: auto; filter: drop-shadow(8px 12px 14px rgba(36, 54, 78, .25)); }
.empty h3 { font-size: 22px; }
.empty p { color: var(--ink-2); }
.empty .pill { margin-top: 10px; }
.empty.small { padding: 22px; }

/* ---------- вход */

.login { max-width: 400px; margin: 8vh auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 34px 30px; text-align: center; }
.login-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; box-shadow: var(--clay); }
.login input { width: 100%; height: 54px; padding: 0 20px; border: 0; border-radius: 999px; font-size: 17px; text-align: center; outline: none; background: rgba(255, 255, 255, .6); box-shadow: var(--press); }
.login .pill { width: 100%; }
.login-error { min-height: 20px; color: #b5463b; font-size: 14px; }
.is-locked .side, .is-locked .top, .is-locked .tabbar { display: none; }
.is-locked .frame { grid-template-columns: 1fr; }

/* ---------- диалоги, тост, всплывашка */

.dlg {
  width: min(480px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--glass-line);
  border-radius: 30px;
  color: var(--ink);
  background: linear-gradient(160deg, #eef3f7, #cbd7e2);
  box-shadow: var(--clay), 0 30px 80px rgba(20, 30, 50, .35);
}
.dlg::backdrop { background: rgba(38, 54, 73, .45); backdrop-filter: blur(4px); }
.dlg[open] { animation: pop .2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.dlg-form { display: flex; flex-direction: column; gap: 14px; padding: 26px; }
.dlg-title { font-size: 24px; }
.dlg-sub { color: var(--muted); margin-top: -8px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 140px; }
.field > span { font-size: 13px; font-weight: 800; color: var(--ink-2); }
.field input, .field select { height: 46px; padding: 0 16px; border: 0; border-radius: 16px; outline: none; background: rgba(255, 255, 255, .65); box-shadow: var(--press); font-weight: 700; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.dlg-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.spacer { flex: 1; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 20px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(160deg, #3d5370, #263649);
  box-shadow: 0 14px 30px rgba(20, 30, 50, .4), inset 1px 1px 0 rgba(255, 255, 255, .1);
  transform: translateX(-50%);
  animation: toast-in .25s ease-out;
  font-weight: 700;
}
.toast.is-out { opacity: 0; transform: translate(-50%, 10px); transition: .25s; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
.toast-undo { border: 0; padding: 6px 14px; border-radius: 999px; font-weight: 800; color: var(--navy); background: #dfe9f1; }

.hl-pop {
  position: fixed;
  z-index: 60;
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: linear-gradient(160deg, #3d5370, #263649);
  box-shadow: 0 10px 24px rgba(20, 30, 50, .4);
}
.hl-pop button { border: 0; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 800; color: #fff; background: rgba(255, 255, 255, .08); }
.hl-pop button:first-child { background: linear-gradient(180deg, #8fd8cb, #3f8f98); }

/* ---------- кабинет в шапке */

.top-me { display: none; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; box-shadow: var(--clay-sm); flex: none; }
.top-me img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 960px) { .top-me { display: block; } }

/* ---------- ввод: микрофон, разбивка, глава */

.capture-input { position: relative; }
.capture-input textarea { display: block; }
.capture-input textarea { padding-right: 58px; }
.mic {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--ink-2);
  background: linear-gradient(160deg, #fff, #d6e3ee);
  box-shadow: var(--clay-sm);
  transition: transform .15s;
}
.mic svg { width: 20px; height: 20px; }
.mic:active { transform: scale(.94); }
.mic.is-rec { color: #fff; background: linear-gradient(160deg, #f08a7a, #c9483b); animation: rec 1.4s ease-in-out infinite; }
@keyframes rec { 50% { box-shadow: 0 0 0 8px rgba(201, 72, 59, .18), var(--clay-sm); } }
.capture-split { margin-top: -4px; }
.capture-split .link { color: var(--teal); font-weight: 800; font-size: 14px; }
.capture-row .capture-chapter { max-width: 220px; }

/* ---------- таймер */

.timer-pill {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 18px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(160deg, #3d5370, #263649);
  box-shadow: 0 14px 30px rgba(20, 30, 50, .4), inset 1px 1px 0 rgba(255, 255, 255, .1);
}
.timer-dot, .live-dot { width: 10px; height: 10px; border-radius: 50%; background: #f2786a; box-shadow: 0 0 0 0 rgba(242, 120, 106, .6); animation: pulse 1.6s infinite; flex: none; }
.live-dot { display: inline-block; margin-right: 2px; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(242, 120, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(242, 120, 106, 0); } }
.timer-body { display: flex; flex-direction: column; line-height: 1.15; }
.timer-clock { font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.timer-book { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #b8c7d7; }
.timer-pill button { border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 800; color: #fff; background: linear-gradient(180deg, #61b0b8, #3a848d); }
.timer-pill .timer-x { padding: 8px 11px; background: rgba(255, 255, 255, .1); }
.pill.is-live { gap: 10px; }
@media (max-width: 960px) { .timer-pill { left: 16px; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); justify-content: space-between; } }

/* ---------- обложки-картинки, кольцо цели */

.cover-img { padding: 0; background: #c9d6e2; }
.cover-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.stat { position: relative; }
.stat-ring {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: conic-gradient(var(--teal) calc(var(--p) * 360deg), rgba(255, 255, 255, .5) 0);
  -webkit-mask: radial-gradient(circle, transparent 54%, #000 56%);
  mask: radial-gradient(circle, transparent 54%, #000 56%);
}

/* ---------- главы и группы */

.notes-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.view-switch { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .4); box-shadow: var(--press); flex: none; }
.view-switch a { padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; color: var(--muted); }
.view-switch a.is-on { color: var(--ink); background: linear-gradient(160deg, #fff, #dfe8f0); box-shadow: var(--clay-sm); }
.group { margin-bottom: 22px; }
.group-head { display: flex; align-items: center; gap: 4px; margin: 6px 0 10px 4px; font-size: 18px; color: var(--ink-2); }
.group-head.is-current::before { content: ""; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.group-empty { padding: 4px 6px; }
.chapter-summary {
  width: 100%;
  margin-bottom: 12px;
  padding: 12px 16px;
  border: 0;
  border-radius: 18px;
  resize: vertical;
  outline: none;
  font-size: 14px;
  font-style: italic;
  background: rgba(255, 255, 255, .35);
  box-shadow: var(--press);
}
.chapter-summary:focus { background: rgba(255, 255, 255, .7); }
.note-chapter { font-weight: 800; color: var(--lav); }

.chapter-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; counter-reset: ch; }
.chapter-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; counter-increment: ch; }
.chapter-list li::before { content: counter(ch); width: 22px; font-size: 12px; font-weight: 900; color: var(--muted); }
.chapter-list li.is-current { background: rgba(255, 255, 255, .55); box-shadow: var(--clay-sm); }
.chapter-list li.is-current::before { color: var(--teal); }
.chapter-name { flex: 1; min-width: 0; border: 0; background: none; padding: 0; text-align: left; font-weight: 700; font-size: 14px; }
.chapter-count { font-size: 12px; color: var(--muted); font-weight: 800; }
.chapter-tools { display: flex; opacity: 0; transition: opacity .2s; }
.chapter-list li:hover .chapter-tools, .chapter-list li:focus-within .chapter-tools { opacity: 1; }
@media (hover: none) { .chapter-tools { opacity: 1; } }
.chapter-tools button { border: 0; background: none; width: 26px; height: 26px; border-radius: 8px; color: var(--muted); }
.chapter-tools button:hover:not(:disabled) { background: rgba(255, 255, 255, .6); color: var(--ink); }
.chapter-tools button:disabled { opacity: .3; }
.chapters-empty { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.chapter-add { display: flex; gap: 8px; }
.chapter-add input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 0; border-radius: 999px; outline: none; background: rgba(255, 255, 255, .55); box-shadow: var(--press); font-weight: 700; }

/* ---------- поиск книги в диалоге */

.book-find { display: flex; gap: 10px; align-items: flex-end; }
.book-find .field { flex: 1; }
.book-find .btn { height: 46px; }
.book-results { display: grid; gap: 6px; max-height: 260px; overflow: auto; padding: 4px; border-radius: 16px; background: rgba(255, 255, 255, .35); box-shadow: var(--press); }
.book-result { display: flex; gap: 10px; align-items: center; padding: 6px; border: 0; border-radius: 12px; background: none; text-align: left; }
.book-result:hover { background: rgba(255, 255, 255, .7); }
.book-result img, .book-result-nocover { width: 34px; height: 50px; object-fit: cover; border-radius: 4px; background: #c9d6e2; flex: none; }
.book-result b { display: block; font-size: 14px; line-height: 1.25; }
.book-result small { color: var(--muted); font-size: 12px; }
.book-results-msg { padding: 10px; color: var(--muted); font-size: 13px; }

/* ---------- вход и кабинет */

.auth { width: 100%; display: flex; flex-direction: column; gap: 12px; text-align: left; margin-top: 8px; }
.auth-tabs { display: flex; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .4); box-shadow: var(--press); }
.auth-tabs button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 999px; font-weight: 800; color: var(--muted); }
.auth-tabs button.is-on { color: var(--ink); background: linear-gradient(160deg, #fff, #dfe8f0); box-shadow: var(--clay-sm); }
.auth-submit { height: 50px; font-size: 16px; }
.auth-error { min-height: 20px; color: #b5463b; font-size: 14px; text-align: center; }
.auth-note { font-size: 12px; color: var(--muted); text-align: center; }
.login h1 { font-size: 26px; }

.me-head { display: flex; align-items: center; gap: 22px; margin-bottom: 22px; }
.me-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: var(--clay); }
.me-head h2 { font-size: 28px; }
.cabinet { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px 34px; }
.cab-block { display: flex; flex-direction: column; gap: 10px; }
.cab-block h3 { font-size: 18px; }
.cab-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.cab-form .field { min-width: 160px; }
.cab-form .btn { height: 46px; }
.cab-note { font-size: 13px; color: var(--muted); }
.cab-row { display: flex; gap: 10px; flex-wrap: wrap; }
.toggle { display: flex; align-items: center; gap: 10px; width: 100%; font-weight: 700; cursor: pointer; }
.toggle input { width: 20px; height: 20px; accent-color: var(--teal); }

/* ---------- пол и аватарки */

.seg-pick { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .4); box-shadow: var(--press); width: fit-content; }
.seg-pick button, .seg-pick label span { display: block; border: 0; background: none; padding: 7px 18px; border-radius: 999px; font-weight: 800; color: var(--muted); cursor: pointer; }
.seg-pick label input { position: absolute; opacity: 0; pointer-events: none; }
.seg-pick button.is-on, .seg-pick label input:checked + span { color: var(--ink); background: linear-gradient(160deg, #fff, #dfe8f0); box-shadow: var(--clay-sm); }
.seg-pick label input:focus-visible + span { outline: 2px solid var(--teal); }
.cab-avatars { grid-column: 1 / -1; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 14px; max-width: 760px; }
.avatar-pick { aspect-ratio: 1; padding: 4px; border: 0; border-radius: 50%; background: linear-gradient(145deg, #e8eff5, #b9c9d8); box-shadow: var(--clay-sm); transition: transform .15s; }
.avatar-pick img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar-pick:hover { transform: translateY(-2px); }
.avatar-pick.is-on { background: linear-gradient(160deg, #61b0b8, #3a848d); box-shadow: 0 0 0 3px rgba(63, 143, 152, .25), var(--clay-sm); }
.login-art { width: 170px; height: auto; filter: drop-shadow(8px 12px 14px rgba(36, 54, 78, .25)); }
.login .seg-pick { align-self: flex-start; }

/* невысокий экран ноутбука: промо в сайдбаре наезжало на меню, повторение и так есть в меню */
@media (max-height: 860px) {
  .side-promo { display: none; }
  .side-foot { margin-top: auto; }
}

/* ---------- темы */

.note-topic { padding: 1px 9px; border-radius: 999px; font-weight: 800; color: #fff; background: linear-gradient(160deg, #a19ed8, #7a76bb); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .4); }
.note-topic:hover { filter: brightness(1.08); }
.capture-row .capture-topic { max-width: 220px; }
.group-topic .group-head a:hover { color: var(--teal); }
.group-tool { margin-left: auto; font-size: 12px; padding: 4px 12px; }
.group-head.is-current .group-tool { color: #fff; background: linear-gradient(160deg, #61b0b8, #3a848d); }
.group-topic.is-none .group-head { color: var(--muted); }
.quick-add { display: flex; gap: 8px; margin-top: 10px; }
.quick-add input, .quick-add select {
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  outline: none;
  font-weight: 700;
  background: rgba(255, 255, 255, .5);
  box-shadow: var(--press);
}
.quick-add input { flex: 1; min-width: 0; }
.quick-add input:focus { background: rgba(255, 255, 255, .85); }
.quick-add select { max-width: 200px; appearance: none; padding-right: 30px; background: rgba(255, 255, 255, .5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2344566e' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center; }
.quick-add .btn { width: 44px; height: 44px; padding: 0; font-size: 22px; color: #fff; background: linear-gradient(180deg, #61b0b8, #3a848d); }

.topic-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; }
.topic-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; }
.topic-list li.is-current { background: rgba(255, 255, 255, .55); box-shadow: var(--clay-sm); }
.topic-list li.is-current .topic-name::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--lav); box-shadow: 0 0 8px var(--lav); vertical-align: 1px; }
.topic-name { flex: 1; min-width: 0; border: 0; background: none; padding: 0; text-align: left; font-weight: 700; font-size: 14px; }
.topic-count { font-size: 12px; color: var(--muted); font-weight: 800; }
.topic-open { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); font-weight: 800; }
.topic-open:hover { background: rgba(255, 255, 255, .6); color: var(--ink); }
.topics-empty { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.topic-add { display: flex; gap: 8px; }
.topic-add input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 0; border-radius: 999px; outline: none; background: rgba(255, 255, 255, .55); box-shadow: var(--press); font-weight: 700; }

.topic-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.topic-chip { padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; color: #5e5aa3; background: rgba(255, 255, 255, .5); }
.topic-chip b { margin-left: 5px; color: var(--muted); font-size: 11px; }
.topic-chip.is-on { color: #fff; background: linear-gradient(160deg, #a19ed8, #7a76bb); }
.topic-chip.is-on b { color: #e9e8fb; }

.topics-head { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; margin-bottom: 22px; }
.topics-head h2 { font-size: 28px; }
.topics-head p { max-width: 520px; margin-top: 4px; }
.topic-add-big { flex: 1; min-width: 260px; max-width: 460px; }
.topic-add-big input { height: 50px; font-size: 16px; }
.topic-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.topic-card { display: flex; flex-direction: column; gap: 6px; min-height: 150px; transition: transform .2s; }
.topic-card:hover { transform: translateY(-3px); }
.topic-card::before { content: ""; width: 34px; height: 6px; border-radius: 999px; background: linear-gradient(90deg, #a19ed8, #7a76bb); margin-bottom: 6px; }
.topic-card-title { font-size: 19px; line-height: 1.25; }
.topic-card-sum, .topic-card-last { margin-top: auto; font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.topic-card-last { font-style: italic; }

.topic-hero { margin-bottom: 22px; }
.topic-hero h2 { font-size: clamp(26px, 3.4vw, 38px); margin-top: 6px; }
.back-link { font-size: 14px; font-weight: 800; color: var(--muted); }
.back-link:hover { color: var(--teal); }
.pill.danger { color: #b5463b; }
.topic-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
@media (max-width: 1180px) { .topic-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .quick-add select { max-width: 110px; }
  .group-tool { display: none; }
}

/* ---------- мобильная навигация */

.tabbar { display: none; }

@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .frame { grid-template-columns: minmax(0, 1fr); padding: 16px 16px 110px; }
  .side { display: none; }
  .duo { grid-template-columns: minmax(0, 1fr); }
  .tabbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 70px;
    padding: 0 6px;
    border-radius: 26px;
    background: linear-gradient(170deg, rgba(52, 72, 95, .94), rgba(38, 54, 73, .96));
    box-shadow: 0 14px 34px rgba(20, 30, 50, .4), inset 1px 1px 0 rgba(255, 255, 255, .1);
    backdrop-filter: blur(10px);
  }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 8px; color: #a9bacb; font-size: 11px; font-weight: 800; }
  .tabbar a.is-active { color: #fff; }
  .tabbar a.is-active svg { stroke: var(--teal-hi); }
  .tabbar .badge { position: absolute; top: 0; right: 0; min-width: 18px; line-height: 18px; font-size: 10px; padding: 0 5px; }
  .tabbar-add {
    width: 58px;
    height: 58px;
    margin-top: -26px;
    border: 4px solid #c0ccd8;
    border-radius: 50%;
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(160deg, var(--teal-hi), var(--teal));
    box-shadow: 0 8px 18px rgba(40, 100, 110, .45), inset 0 2px 2px rgba(255, 255, 255, .45);
  }
  .is-locked .tabbar { display: none; }
}

@media (max-width: 640px) {
  .top { gap: 10px; margin: 0 0 16px; flex-wrap: wrap; }
  .top-title { font-size: 30px; }
  .top-search { order: 3; max-width: none; flex-basis: 100%; height: 46px; }
  .top-search kbd { display: none; }
  .top-btn { margin-left: auto; width: 44px; height: 44px; }
  .hero { grid-template-columns: 1fr; padding: 0 20px; min-height: 0; }
  .hero-img { position: absolute; right: -24px; bottom: 16px; width: 170px; margin: 0; opacity: .95; }
  .hero-text { padding: 24px 120px 46px 0; }
  .hero-text p { font-size: 15px; }
  .hero-plant { display: none; }
  .hero-actions .pill { height: 42px; padding: 0 16px; font-size: 14px; }
  .stats { gap: 12px; }
  .stat { min-height: 160px; padding: 14px; }
  .stat-ic { width: 46px; height: 46px; }
  .stat-ic img { width: 30px; }
  .stat-value { font-size: 30px; }
  .card { padding: 16px; border-radius: 22px; }
  .capture-hint, .capture-card .card-head .muted { display: none; }
  .capture-row select { max-width: 160px; }
  .bars { height: 170px; gap: 6px; }
  .donut { width: 140px; height: 140px; }
  .book-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .cover.big { width: 120px; min-height: 170px; }
  .book-cards { grid-template-columns: minmax(0, 1fr); }
  .notes-grid { grid-template-columns: minmax(0, 1fr); }
  .review-card { padding: 24px; min-height: 260px; }
  .mix-body { padding-right: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- заставка при загрузке */

.splash { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 14px; }
.splash img { width: 92px; height: auto; filter: drop-shadow(8px 12px 16px rgba(36, 54, 78, .28)); animation: splash 1.6s ease-in-out infinite; }
.splash span { font-size: 22px; font-weight: 900; color: #d3dde7; text-shadow: 1px 1px 1px #fff, -1px -1px 1px rgba(36, 54, 78, .45); }
@keyframes splash { 50% { transform: translateY(-8px) rotate(-3deg); } }

/* ---------- лендинг: один день читателя */

.is-locked .frame { display: block; max-width: none; padding: 0; }
.is-locked .main { padding: 0; }

.ld { --ink-day: #1f2f45; --ink-day-2: #3a4c64; position: relative; isolation: isolate; overflow: clip; background: #1c2440; color: var(--ink-day); }
.ld h1, .ld h2 { margin: 0; font-weight: 900; letter-spacing: -0.02em; text-wrap: balance; }
.ld p { text-wrap: pretty; }

.ld-nav {
  position: absolute;
  z-index: 6;
  top: clamp(14px, 1.8vw, 28px);
  left: 5vw;
  right: 5vw;
  display: flex;
  align-items: center;
  gap: 28px;
}
.ld-brand { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(20px, 1.7vw, 26px); font-weight: 900; color: var(--ink-day); }
.ld-brand img { width: clamp(30px, 2.6vw, 40px); height: auto; filter: drop-shadow(3px 6px 6px rgba(36, 54, 78, .28)); }
.ld-links { display: flex; gap: 26px; margin-left: auto; font-weight: 800; font-size: 15px; color: var(--ink-day-2); }
.ld-links a:hover { color: #2f7f86; }
.ld-signin {
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  color: var(--ink-day);
  background: linear-gradient(160deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .5));
  box-shadow: inset 1px 1px 0 #fff, 0 6px 16px rgba(36, 54, 78, .18);
  backdrop-filter: blur(8px);
}

/* сцены идут встык во всю ширину, текст и живые карточки стоят поверх в своих местах сцены */
.ld-scene { position: relative; aspect-ratio: 3 / 2; }
.ld-stage { position: absolute; inset: 0; z-index: 0; overflow: clip; }
.ld-plate { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ld-anchor { display: block; height: 0; }
.ld-veil { position: absolute; inset: 0; z-index: 5; background: #0d1330; opacity: 0; pointer-events: none; }
.ld-copy { position: absolute; z-index: 2; display: flex; flex-direction: column; gap: clamp(12px, 1.2vw, 20px); }
.ld-copy h2 { font-size: clamp(30px, 3.2vw, 54px); line-height: 1.04; }
.ld-copy p { margin: 0; font-size: clamp(15px, 1.12vw, 19px); line-height: 1.55; font-weight: 700; color: var(--ink-day-2); max-width: 40ch; }

.ld-copy-hero { left: 22vw; top: 12.5%; width: 52%; }
.ld-copy-hero h1 { font-size: clamp(40px, 4.4vw, 76px); line-height: 1; color: var(--ink-day); }
.ld-copy-hero p { font-size: clamp(16px, 1.2vw, 20px); max-width: 50ch; color: #2e4059; }
/* лёгкая дымка над городом, чтобы текст читался, а сцена оставалась видна */
.ld-morning::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(42% 30% at 42% 27%, rgba(234, 240, 248, .72), rgba(234, 240, 248, 0) 100%); }
.ld-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: clamp(6px, .8vw, 14px); }
.ld-cta {
  height: clamp(50px, 3.8vw, 60px);
  padding: 0 clamp(24px, 2.2vw, 34px);
  border: 0;
  border-radius: 999px;
  font-size: clamp(16px, 1.15vw, 19px);
  font-weight: 900;
  color: #fff;
  background: linear-gradient(180deg, #5fb0b8, #2f7f86);
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, .45), inset 0 -4px 8px rgba(0, 0, 0, .18), 0 12px 26px rgba(40, 100, 110, .38);
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), filter .18s;
}
.ld-cta:hover { filter: brightness(1.06); transform: translateY(-1px); }
.ld-cta:active { transform: translateY(1px) scale(.98); }
.ld-quiet { border: 0; background: none; padding: 6px 2px; font-weight: 800; font-size: 15px; color: var(--ink-day-2); text-decoration: underline; text-decoration-color: rgba(47, 127, 134, .5); text-underline-offset: 5px; }
.ld-quiet:hover { color: #2f7f86; }

/* живая заметка на стеклянной табличке со стола */
.ld-desk {
  position: absolute;
  z-index: 2;
  left: 72.4%;
  top: 50.4%;
  width: 17.6%;
  height: 16.2%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px 18px;
  color: var(--ink-day);
}
.ld-desk-meta { display: inline-flex; align-items: center; gap: .4vw; font-size: clamp(11px, .85vw, 14px); font-weight: 800; color: #2f7f86; }
.ld-dot { width: .5vw; height: .5vw; min-width: 6px; min-height: 6px; border-radius: 50%; background: #3f8f98; }
.ld-desk-time { font-weight: 900; color: var(--ink-day); font-variant-numeric: tabular-nums; }
.ld-desk-text { margin: 0; flex: 1; font-size: clamp(13px, 1.15vw, 19px); line-height: 1.25; font-weight: 800; overflow: hidden; transition: opacity .3s; }
.ld-desk-text.is-fade { opacity: 0; }
.ld-caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -0.12em; background: #2f7f86; animation: ld-caret 1s steps(2) infinite; }
@keyframes ld-caret { 50% { opacity: 0; } }
.ld-desk-btn {
  align-self: flex-start;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  font-size: clamp(12px, .9vw, 15px);
  font-weight: 900;
  color: #fff;
  background: linear-gradient(180deg, #5fb0b8, #2f7f86);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .45), 0 4px 10px rgba(40, 100, 110, .3);
}

/* время дня в углу сцены */
.ld-time {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  padding: 7px 15px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-day-2);
  background: linear-gradient(160deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .56));
  box-shadow: inset 1px 1px 0 #fff, 0 8px 18px rgba(36, 54, 78, .18);
  backdrop-filter: blur(8px);
  top: clamp(16px, 2.4vw, 34px);
  right: 4vw;
}
.ld-time b { font-size: 17px; font-weight: 900; color: var(--ink-day); font-variant-numeric: tabular-nums; }
.ld-evening .ld-time, .ld-night .ld-time { color: #dfe2f6; background: linear-gradient(160deg, rgba(40, 42, 82, .78), rgba(30, 32, 66, .6)); box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .14), 0 8px 18px rgba(8, 10, 30, .3); }
.ld-evening .ld-time b, .ld-night .ld-time b { color: #fff; }

/* дорога */
.ld-commute .ld-copy { left: 5vw; bottom: 8%; width: 39%; }
.ld-voice {
  margin: 4px 0 0;
  padding: 16px 20px;
  border-radius: 22px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .42));
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: inset 1px 1px 0 #fff, 0 14px 30px rgba(36, 54, 78, .18);
  backdrop-filter: blur(10px);
  max-width: 34ch;
}
.ld-voice-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; color: #2f7f86; }
.ld-wave { display: inline-flex; align-items: center; gap: 3px; height: 16px; }
.ld-wave i { width: 3px; border-radius: 3px; background: #3f8f98; animation: ld-wave 1.1s ease-in-out infinite; }
.ld-wave i:nth-child(1) { height: 6px; animation-delay: -.2s; }
.ld-wave i:nth-child(2) { height: 14px; animation-delay: -.5s; }
.ld-wave i:nth-child(3) { height: 9px; animation-delay: -.1s; }
.ld-wave i:nth-child(4) { height: 15px; animation-delay: -.7s; }
.ld-wave i:nth-child(5) { height: 7px; animation-delay: -.35s; }
@keyframes ld-wave { 50% { transform: scaleY(.45); } }
.ld-voice blockquote { margin: 8px 0 0; font-size: 17px; font-weight: 800; line-height: 1.4; color: var(--ink-day); }

/* вечер: тёмное стекло поверх сумерек, живая карточка повторения */
.ld-copy-dark {
  left: 3.6vw;
  bottom: 5%;
  width: 34%;
  padding: clamp(22px, 2vw, 32px);
  border-radius: 30px;
  color: #f1f2fb;
  background: linear-gradient(160deg, rgba(42, 44, 84, .78), rgba(30, 32, 64, .66));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 24px 50px rgba(12, 14, 34, .4), inset 1px 1px 0 rgba(255, 255, 255, .1);
  backdrop-filter: blur(16px);
}
.ld-copy-dark h2 { color: #fff; font-size: clamp(26px, 2.5vw, 42px); }
.ld-copy-dark p { color: #cfd1ec; font-size: clamp(14px, 1vw, 17px); }
.ld-review {
  padding: 16px 18px 14px;
  border-radius: 20px;
  color: var(--ink-day);
  background: linear-gradient(160deg, #eef3f8, #d3dde8);
  box-shadow: inset 1px 1px 0 #fff, 0 12px 26px rgba(10, 12, 30, .35);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .22s;
}
.ld-review.is-flip { transform: rotateX(70deg) translateY(-6px); opacity: .2; }
.ld-review-meta { font-size: 12px; font-weight: 800; color: #6b6fb0; }
.ld-review .ld-review-text { margin: 6px 0 12px; font-size: 17px; font-weight: 900; line-height: 1.35; color: var(--ink-day); max-width: none; }
.ld-review-btns { display: flex; gap: 8px; }
.ld-review-btns button { flex: 1; height: 40px; padding: 0 10px; border: 0; border-radius: 999px; font-size: 14px; font-weight: 800; white-space: nowrap; }
.ld-review-btns [data-review-btn="again"] { color: var(--ink-day); background: rgba(255, 255, 255, .8); box-shadow: inset 1px 1px 0 #fff, 0 3px 8px rgba(36, 54, 78, .14); }
.ld-review-btns [data-review-btn="ok"] { color: #fff; background: linear-gradient(180deg, #5fb0b8, #2f7f86); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .4), 0 6px 14px rgba(40, 100, 110, .35); }
.ld-review-next { display: block; margin-top: 10px; font-size: 13px; font-weight: 800; color: #4c5a71; }
.ld-topics { display: flex; gap: 8px; flex-wrap: wrap; }
.ld-topics span { padding: 5px 13px; border-radius: 999px; font-size: 13px; font-weight: 800; color: #fff; background: linear-gradient(160deg, #a19ed8, #7a76bb); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .35); }

/* изнутри: настоящие экраны дневника */
.ld-inside { position: relative; padding: clamp(36px, 4vw, 64px) 6vw clamp(60px, 6vw, 96px); background: linear-gradient(180deg, #b3b2d6, #9a99c7); }
.ld-inside-head { max-width: 640px; }
.ld-inside-head h2 { font-size: clamp(30px, 3.2vw, 54px); line-height: 1.04; color: #1d2944; }
.ld-inside-head p { margin: 14px 0 0; font-size: clamp(15px, 1.12vw, 19px); line-height: 1.55; font-weight: 700; color: #2d3754; max-width: 46ch; }
.ld-devices { position: relative; z-index: 2; margin: clamp(36px, 4vw, 60px) auto 0; max-width: 1180px; padding-right: 9%; }
.ld-laptop { padding: 12px; border-radius: 22px; background: linear-gradient(170deg, #34485f, #1f2d3e); box-shadow: 0 34px 70px rgba(30, 30, 70, .38), inset 1px 1px 0 rgba(255, 255, 255, .1); }
.ld-laptop img { width: 100%; height: auto; border-radius: 12px; }
.ld-phone { position: absolute; right: 0; bottom: -40px; width: 22%; padding: 8px; border-radius: 34px; background: linear-gradient(170deg, #34485f, #1f2d3e); box-shadow: 0 30px 60px rgba(20, 20, 60, .45), inset 1px 1px 0 rgba(255, 255, 255, .12); }
.ld-phone img { width: 100%; height: auto; border-radius: 26px; }
.ld-little { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 26px; }
.ld-little li { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 800; color: #1d2944; }
.ld-demo-note { margin: 56px 0 0; font-size: 13px; font-weight: 700; color: #3d4766; }
.ld-little img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(2px 4px 4px rgba(30, 30, 70, .22)); }

/* ночь: финал дня и форма */
.ld-copy-night { left: 6vw; top: 9%; width: 33%; color: #eef0fb; }
.ld-copy-night h2 { color: #fff; }
.ld-copy-night p { color: #c9cdea; }
.ld-form {
  margin-top: 4px;
  padding: clamp(20px, 1.8vw, 28px);
  border-radius: 28px;
  color: var(--ink-day);
  background: linear-gradient(160deg, rgba(240, 244, 250, .94), rgba(214, 222, 234, .9));
  box-shadow: 0 28px 60px rgba(8, 12, 40, .45), inset 1px 1px 0 #fff;
}
.ld-form .auth { margin: 0; gap: 10px; }
.ld-form .auth-note { color: #4c5a71; }

.ld-foot { position: relative; z-index: 2; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 28px 6vw 36px; font-size: 14px; font-weight: 700; color: #aab1d4; background: #1c2440; }
.ld-foot .ld-brand { color: #eef0fb; }
.ld-foot b { color: #eef0fb; }
.ld-foot a { margin-left: auto; color: #aab1d4; }
.ld-foot a:hover { color: #8fd0c2; }

/* ---------- лендинг: движение. сцены как страницы сказки, живые мелочи, проявление текста */
.ld { --ease-out: cubic-bezier(0.23, 1, 0.32, 1); --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); }

/* живые мелочи в сценах */
.ld-fx { position: absolute; inset: 0; pointer-events: none; overflow: clip; }
.ld-fx > i, .ld-fx > span, .ld-steam i, .ld-window i { position: absolute; display: block; }
.ld-mote { left: var(--x); top: var(--y); width: calc(8px * var(--k)); height: calc(8px * var(--k)); border-radius: 50%; background: radial-gradient(circle, rgba(255, 250, 232, .95), rgba(255, 244, 214, 0) 70%); opacity: 0; }
.ld-steam { left: 62.6%; top: 33%; width: 4.4%; height: 15%; }
.ld-steam i { bottom: 0; left: 25%; width: 50%; height: 42%; border-radius: 50%; background: radial-gradient(ellipse, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 70%); filter: blur(3px); opacity: 0; }
.ld-window { left: 0; top: 0; width: 48.6%; height: 60%; border-bottom-right-radius: 3.6vw; overflow: clip; }
.ld-window i { top: -20%; bottom: -20%; left: 0; width: 24%; background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .3) 46%, rgba(255, 255, 255, .1) 62%, rgba(255, 255, 255, 0)); transform: translateX(-130%) skewX(-12deg); }
.ld-glow { border-radius: 50%; transform: translate(-50%, -50%); opacity: .6; }
.ld-glow-lamp { left: 92.6%; top: 10%; width: 24vw; height: 24vw; background: radial-gradient(circle, rgba(255, 214, 150, .42), rgba(255, 214, 150, 0) 64%); }
.ld-glow-phone { left: 86%; top: 84%; width: 9vw; height: 6vw; background: radial-gradient(ellipse, rgba(150, 190, 255, .5), rgba(150, 190, 255, 0) 70%); }
.ld-glow-moon { left: 64.3%; top: 18.8%; width: 11vw; height: 11vw; background: radial-gradient(circle, rgba(222, 228, 255, .34), rgba(222, 228, 255, 0) 66%); }
.ld-glow-nightlamp { left: 88.5%; top: 60%; width: 17vw; height: 17vw; background: radial-gradient(circle, rgba(255, 200, 130, .44), rgba(255, 200, 130, 0) 64%); }
.ld-star { left: var(--x); top: var(--y); width: calc(3px * var(--k)); height: calc(3px * var(--k)); border-radius: 50%; background: #fff; box-shadow: 0 0 6px 1px rgba(255, 255, 255, .55); opacity: .25; transform: scale(.7); }
.ld-shoot { left: 70%; top: 7%; width: 9vw; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0)); opacity: 0; transform: rotate(-20deg); transform-origin: 0 50%; }

@media (prefers-reduced-motion: no-preference) {
  .ld-mote { animation: ld-mote var(--t) ease-in-out var(--d) infinite; }
  .ld-steam i { animation: ld-steam 3.6s var(--ease-out) infinite; }
  .ld-steam i:nth-child(2) { animation-delay: -1.2s; }
  .ld-steam i:nth-child(3) { animation-delay: -2.4s; }
  .ld-window i { animation: ld-pass 7s var(--ease-in-out) infinite; }
  .ld-glow { animation: ld-breathe 5.5s ease-in-out infinite; }
  .ld-glow-phone { animation-duration: 2.8s; }
  .ld-glow-moon { animation-duration: 8s; }
  .ld-star { animation: ld-twinkle calc(var(--t) * .6) ease-in-out var(--d) infinite; }
  .ld-shoot { animation: ld-shoot 11s var(--ease-out) 3s infinite; }

  /* первый экран собирается при загрузке, один раз */
  .is-intro .ld-nav, .is-intro .ld-copy-hero > * { animation: ld-in 900ms var(--ease-out) both; }
  .is-intro .ld-copy-hero > :nth-child(1) { animation-delay: 120ms; }
  .is-intro .ld-copy-hero > :nth-child(2) { animation-delay: 200ms; }
  .is-intro .ld-copy-hero > :nth-child(3) { animation-delay: 280ms; }
  .is-intro .ld-desk { animation: ld-fade 900ms var(--ease-out) 520ms both; }
  .is-intro .ld-morning .ld-plate { animation: ld-settle 1800ms var(--ease-out) both; }
}

/* скролл: сцены наезжают друг на друга, как страницы книги */
@media (min-width: 861px) {
  .ld-scene, .ld-inside { position: sticky; top: var(--stick, 0px); }
  .ld-night { position: relative; }
  .ld-commute, .ld-evening, .ld-inside, .ld-night {
    overflow: clip;
    border-radius: clamp(20px, 2.4vw, 36px) clamp(20px, 2.4vw, 36px) 0 0;
    box-shadow: 0 -18px 44px rgba(14, 20, 46, .24);
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* сцена приезжает с лёгким наездом камеры */
    .ld-commute .ld-plate, .ld-evening .ld-plate, .ld-night .ld-plate { animation: ld-drift var(--ease-out) both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
    /* текст проявляется по мере прокрутки, каждый блок в свой момент */
    .ld-commute .ld-copy > *, .ld-copy-dark > *, .ld-copy-night > h2, .ld-copy-night > p, .ld-inside-head > *, .ld-devices, .ld-demo-note, .ld-little li {
      animation: ld-rise var(--ease-out) both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
  }
  @media (min-width: 861px) and (prefers-reduced-motion: no-preference) {
    /* предыдущая страница уходит вглубь и темнеет, пока на неё наезжает следующая */
    .ld { timeline-scope: --p-commute, --p-evening, --p-inside, --p-night; }
    .ld-commute { view-timeline-name: --p-commute; }
    .ld-evening { view-timeline-name: --p-evening; }
    .ld-inside { view-timeline-name: --p-inside; }
    .ld-night { view-timeline-name: --p-night; }
    .ld-morning, .ld-commute, .ld-evening, .ld-inside { transform-origin: 50% calc(100% - 50vh); }
    .ld-morning { animation: ld-recede linear both; animation-timeline: --p-commute; animation-range: entry 0% entry 100%; }
    .ld-commute { animation: ld-recede linear both; animation-timeline: --p-evening; animation-range: entry 0% entry 100%; }
    .ld-evening { animation: ld-recede linear both; animation-timeline: --p-inside; animation-range: entry 0% entry 100%; }
    .ld-inside { animation: ld-recede linear both; animation-timeline: --p-night; animation-range: entry 0% entry 100%; }
    .ld-morning > .ld-veil { animation: ld-dim linear both; animation-timeline: --p-commute; animation-range: entry 0% entry 100%; }
    .ld-commute > .ld-veil { animation: ld-dim linear both; animation-timeline: --p-evening; animation-range: entry 0% entry 100%; }
    .ld-evening > .ld-veil { animation: ld-dim linear both; animation-timeline: --p-inside; animation-range: entry 0% entry 100%; }
    .ld-inside > .ld-veil { animation: ld-dim linear both; animation-timeline: --p-night; animation-range: entry 0% entry 100%; }
  }
}

@keyframes ld-mote { 0% { opacity: 0; transform: translate(0, 0); } 25% { opacity: .9; } 75% { opacity: .6; } 100% { opacity: 0; transform: translate(2.4vw, -5vw); } }
@keyframes ld-steam { 0% { opacity: 0; transform: translateY(0) scale(.7); } 30% { opacity: .85; } 100% { opacity: 0; transform: translateY(-240%) scale(1.7); } }
@keyframes ld-pass { 0% { transform: translateX(-130%) skewX(-12deg); } 45%, 100% { transform: translateX(560%) skewX(-12deg); } }
@keyframes ld-breathe { 0%, 100% { opacity: .55; } 50% { opacity: .95; } }
@keyframes ld-twinkle { 0%, 100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1); } }
@keyframes ld-shoot { 0% { opacity: 0; transform: rotate(-20deg) translateX(0); } 2% { opacity: 1; } 9% { opacity: 0; transform: rotate(-20deg) translateX(-30vw); } 100% { opacity: 0; transform: rotate(-20deg) translateX(-30vw); } }
@keyframes ld-in { from { opacity: 0; transform: translateY(18px); } }
@keyframes ld-fade { from { opacity: 0; } }
@keyframes ld-settle { from { transform: scale(1.06); } }
@keyframes ld-drift { from { transform: scale(1.1) translateY(-3%); } }
@keyframes ld-rise { from { opacity: 0; transform: translateY(32px); } }
@keyframes ld-recede { to { transform: scale(.92); } }
@keyframes ld-dim { to { opacity: .5; } }

/* браузерные мелочи в палитре */
::selection { background: rgba(143, 208, 194, .65); color: inherit; }
input, textarea { caret-color: #2f7f86; }
:focus-visible { outline: 3px solid rgba(63, 143, 152, .6); outline-offset: 2px; }
html { scrollbar-color: rgba(46, 65, 89, .45) transparent; }

@media (prefers-reduced-motion: reduce) {
  .ld-wave i, .ld-caret { animation: none; }
}

@media (min-width: 861px) {
  .ld-inside { display: grid; grid-template-columns: minmax(300px, 4fr) 8fr; grid-template-rows: auto auto 1fr; column-gap: 5vw; align-items: start; }
  .ld-inside-head { grid-column: 1; grid-row: 1; }
  .ld-demo-note { grid-column: 1; grid-row: 2; margin-top: 22px; }
  .ld-little { grid-column: 1; grid-row: 3; flex-direction: column; gap: 14px; margin-top: 26px; }
  .ld-devices { grid-column: 2; grid-row: 1 / 4; margin: 0 0 40px; max-width: none; }
}

/* на узких экранах текст уходит под сцену: поверх маленькой картинки его не прочесть */
@media (max-width: 860px) {
  .ld-nav { position: relative; top: 0; left: 0; right: 0; padding: 14px 16px; background: #dfe8ef; }
  .ld-links { display: none; }
  .ld-signin { margin-left: auto; height: 40px; padding: 0 18px; }
  .ld-scene { aspect-ratio: auto; display: flex; flex-direction: column; }
  .ld-stage { position: relative; inset: auto; aspect-ratio: 3 / 2; }
  .ld-copy, .ld-copy-hero, .ld-commute .ld-copy, .ld-copy-dark, .ld-copy-night { position: relative; inset: auto; width: auto; padding: 26px 16px 30px; background: inherit; }
  .ld-copy p, .ld-copy-hero p { max-width: none; }
  .ld-morning { background: #dfe8ef; aspect-ratio: auto; }
  .ld-morning .ld-stage { order: 1; }
  .ld-morning::after { display: none; }
  .ld-morning .ld-copy-hero { order: -1; padding-top: 10px; }
  .ld-copy-hero h1 { font-size: 40px; }
  .ld-desk { position: relative; left: auto; top: auto; width: auto; height: auto; margin: 0 16px 24px; max-width: 260px; padding: 14px 16px; gap: 8px; border-radius: 18px; background: linear-gradient(150deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .7)); box-shadow: 0 12px 26px rgba(36, 54, 78, .2); }
  .ld-desk-meta { font-size: 12px; gap: 6px; }
  .ld-desk-text { font-size: 15px; }
  .ld-desk-btn { font-size: 13px; padding: 6px 14px; }
  .ld-commute { background: #c3cad6; }
  .ld-evening { background: #2b2c56; }
  .ld-copy-dark { border-radius: 0; box-shadow: none; border: 0; backdrop-filter: none; background: inherit; }
  .ld-night { background: #1f2a52; }
  .ld-copy-night { padding-top: 8px; }
  .ld-time { font-size: 13px; padding: 6px 13px; right: 12px; top: 12px; }
  .ld-time b { font-size: 15px; }
  .ld-inside { background: #aeadd4; }
  .ld-little { padding-bottom: 8px; }
  .ld-laptop { display: none; }
  .ld-devices { padding: 0; }
  .ld-phone { position: static; width: min(78vw, 320px); margin: 0 auto; }
  .ld-demo-note { margin-top: 18px; text-align: center; }
  .ld-foot a { margin-left: 0; }
}
