/* Личный кабинет «Путь к спокойствию». Цвета — как на сайте (client/src/index.css).
   Шрифты системные: без запросов к сторонним серверам. */
:root {
  --primary: #305666;
  --primary-ink: #fff;
  --bg: #f8fbfc;
  --ink: #243b42;
  --card: #fff;
  --line: #bfd4dc;
  --muted: #657f8a;
  --soft: #e8f1f3;
  --accent: #e8f1f3;
  --ok: #2f7d5b;
  --warn-bg: #fff6e5;
  --error: #b3261e;
  --radius: 14px;
  --sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
}
a { color: var(--primary); }
h1, h2 { font-family: var(--sans); font-weight: 600; line-height: 1.25; }
h1 { font-size: 1.6rem; margin: 0 0 .4rem; }
h2 { font-size: 1.2rem; margin: 0 0 .2rem; }
.muted { color: var(--muted); margin: 0 0 1rem; }
main { max-width: 760px; margin: 0 auto; padding: 1.25rem 16px 3rem; }

.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top__in { max-width: 760px; margin: 0 auto; padding: .6rem 16px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font-family: var(--sans); font-size: 1.05rem; }
.brand small { color: var(--muted); font-size: .8rem; }
.top__user { display: flex; align-items: center; gap: .75rem; }
.badge { background: var(--accent); color: var(--primary); border-radius: 999px; padding: .15rem .65rem; font-size: .8rem; font-weight: 600; white-space: nowrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.stack > * + * { margin-top: .9rem; }
.loading { text-align: center; color: var(--muted); padding: 3rem 0; }

/* вход */
.auth { max-width: 460px; margin: 1.5rem auto 0; }
.auth__card { padding: 1.5rem; }
.field { display: block; margin: 0 0 1rem; }
.field span { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .3rem; }
.field input {
  width: 100%; font: inherit; color: inherit; background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem;
}
.field input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
#code { font-size: 1.4rem; letter-spacing: .4em; text-align: center; }
.check { display: flex; gap: .6rem; align-items: flex-start; margin: 0 0 .7rem; font-size: .95rem; cursor: pointer; }
.check input { width: 1.15rem; height: 1.15rem; margin: .18rem 0 0; accent-color: var(--primary); flex: none; }
.btn {
  display: block; width: 100%; margin-top: 1rem; border: 0; border-radius: 10px;
  background: var(--primary); color: var(--primary-ink); font: 600 1rem var(--sans);
  padding: .8rem 1rem; cursor: pointer;
}
.btn:disabled { opacity: .6; cursor: wait; }
.btn:focus-visible, .link:focus-visible, .seg button:focus-visible, .day__sum:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.link { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.row { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; font-size: .95rem; }
.error { color: var(--error); margin: .5rem 0 0; font-size: .95rem; }
.fine { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 1rem; }
.fine--left { text-align: left; margin-bottom: 0; }

/* кабинет */
.intro { margin-bottom: 1.25rem; }
.seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 3px; }
.seg button {
  border: 0; background: none; color: var(--ink); font: 600 .9rem var(--sans);
  padding: .4rem 1rem; border-radius: 999px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--card); color: var(--primary); box-shadow: 0 1px 3px rgb(0 0 0 / .08); }
.group { margin-top: 2rem; }
.group__sub { margin-bottom: .8rem; font-size: .9rem; }
.group > .card { padding: 1rem; }
.days { display: grid; gap: .5rem; }

.day__sum { list-style: none; display: flex; align-items: center; gap: .8rem; padding: .75rem 1rem; cursor: pointer; }
.day__sum::-webkit-details-marker { display: none; }
.day__num {
  flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--primary); font-weight: 700;
}
.day__title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.day__title small { color: var(--muted); font-size: .78rem; }
.day__icons { display: flex; gap: .3rem; }
.ico { width: 1.6rem; height: 1.6rem; border-radius: 6px; display: grid; place-items: center; font-size: .75rem; background: var(--soft); color: var(--muted); }
.ico--video { color: var(--primary); }
.day__done { display: none; color: var(--ok); font-weight: 700; }
.day--done .day__done { display: inline; }
.day--done .day__num { background: var(--ok); color: var(--card); }
.day[open] .day__sum { border-bottom: 1px solid var(--line); }
.day__body { padding: 1rem; }
.note { margin: 0; padding: .55rem .8rem; border-radius: 10px; background: var(--warn-bg); font-size: .9rem; }

.item__label { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: .35rem; }
.watched { color: var(--ok); text-transform: none; letter-spacing: 0; font-size: .85rem; }
.item--target .mp { box-shadow: 0 0 0 3px var(--primary); }
.locked { display: flex; gap: .75rem; align-items: center; padding: .8rem 1rem; border: 1px dashed var(--line); border-radius: 12px; background: var(--soft); }
.locked__text { display: flex; flex-direction: column; }
.locked__text small { color: var(--muted); }

/* плеер (client/public/player) в цветах кабинета */
.mp {
  --mp-bg: var(--card);
  --mp-bg-hover: var(--soft);
  --mp-line: var(--line);
  --mp-text: var(--ink);
  --mp-muted: var(--muted);
  --mp-accent: var(--primary);
  --mp-error: var(--error);
  --mp-radius: 12px;
  --mp-font: var(--sans);
}

.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 1.5rem 16px 2rem; }
.foot a { color: var(--muted); }

/* юридические страницы и 404 */
.doc { max-width: 760px; margin: 0 auto; padding: 1.5rem 16px 3rem; }
.doc .card { padding: 1.5rem; }
.pending { background: var(--warn-bg); border-radius: 10px; padding: .8rem 1rem; }

@media (max-width: 480px) {
  h1 { font-size: 1.35rem; }
  .brand small { display: none; }
  .day__sum { padding: .7rem .8rem; gap: .6rem; }
  .day__body { padding: .8rem; }
}

/* V27 — calm media accompaniment */
main{max-width:880px}.top__in{max-width:880px}.brand img{width:38px;height:38px;border:1px solid #5790a5;border-radius:50%;padding:5px}.brand b{color:#305666}.intro{background:#305666;color:white;border-radius:16px;padding:24px}.intro h1{font-size:clamp(24px,4vw,36px)}.intro .muted{color:#d9e8ed}.intro .seg{background:#e8f1f3}.auth__card{padding:clamp(20px,5vw,36px);border-color:#9bbdc9}.auth h1{color:#305666}.group h2{color:#305666}.day__num{border-radius:10px}.day__sum{min-height:64px}.card{border-color:#bfd4dc}.btn{min-height:46px}.brand b{font-weight:700}.foot{border-top:1px solid var(--line)}

.path-hero{background:#305666;color:white;padding:28px;border-radius:16px;margin-bottom:16px}.path-hero .btn{background:white;color:#305666;max-width:260px}.path-progress{width:100%;height:10px;accent-color:#9bd1db}.path-timer{font-size:.9rem;color:#d9e8ed}.path-weeks{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:16px 0}.path-week,.path-day{font:inherit;color:#305666;background:white;border:1px solid #bfd4dc;border-radius:10px;padding:12px;cursor:pointer;min-height:44px}.path-week{font-size:.9rem;text-align:left}.path-week[aria-pressed=true],.path-day[aria-pressed=true]{background:#305666;color:white}.path-days{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin:12px 0}.path-panel{margin-top:16px;padding:20px}.path-panel>.item{margin-top:16px}.path-panel h2{color:#305666}@media(max-width:520px){.path-weeks{grid-template-columns:repeat(2,1fr)}.path-day{padding:7px 3px;font-size:.8rem}.path-panel{padding:12px}.path-hero{padding:20px}}
