/* Дополнение к стилям прототипа: экраны, которых в прототипе не было
   (вход, кабинет, расписание, настройки проекта), и мелкие правки под серверную вёрстку.
   Палитра, радиусы и тени берутся из artflow.css — новых цветов здесь нет. */

/* --- контейнеры тёмных страниц (анкета, настройки) ------------------------ */
body.dark .wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px 96px; }
body.dark .card { max-width: 1000px; margin-left: auto; margin-right: auto; }
body.dark .topbar { background: #141216; border-bottom-color: #2A2A33; }
body.dark .topbar .wordmark2, body.dark .hello { color: #EFEAFF; }
body.dark .menuBtn, body.dark .themeBtn { color: #EFEAFF; border-color: #3A3A46; }

.slotset[hidden] { display: none; }

/* --- боковая панель: ссылки выглядят как кнопки прототипа ---------------- */
.drawer a {
  display: block; width: 100%; border: 0; background: transparent; color: #fff;
  text-align: left; padding: 13px; border-radius: 10px; text-decoration: none;
}
.drawer a:hover { background: #222328; }

/* --- сообщения ----------------------------------------------------------- */
.flash { max-width: 1240px; margin: 14px auto 0; padding: 0 20px; }
.flashItem {
  border-radius: 14px; padding: 13px 16px; font-weight: 700; font-size: 14px;
  background: #E0F9F1; color: #0B7A56; margin-bottom: 8px;
}
.flashItem.warning { background: #FFF0DC; color: #95560A; }
.flashItem.error { background: #FFEBF3; color: #B0154A; }

/* --- обычные светлые страницы ------------------------------------------- */
.pageWrap { max-width: 1000px; margin: 0 auto; padding: 30px 20px 70px; }
.pageTitle {
  font-size: clamp(30px, 5vw, 52px); font-weight: 1000; letter-spacing: -.035em;
  text-transform: uppercase; line-height: .95;
}
.pageLead { color: var(--muted); font-size: 14px; margin-top: 10px; max-width: 62ch; }
.pageCard {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 22px; margin-top: 18px;
}
.bigNumber { font-size: 54px; font-weight: 1000; line-height: 1; letter-spacing: -.04em; }

/* --- статистика ---------------------------------------------------------- */
.statGrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-top: 20px;
}
.stat {
  background: var(--card); border: 2.5px solid #0B0B0D; box-shadow: 5px 5px 0 #0B0B0D;
  border-radius: 18px; padding: 18px;
}
.stat b { display: block; font-size: 38px; font-weight: 1000; line-height: 1; letter-spacing: -.04em; }
.stat span { display: block; margin-top: 8px; font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* --- ачивки -------------------------------------------------------------- */
.achRow { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.ach {
  flex: 1 1 190px; max-width: 260px; border: 1.5px solid var(--line); border-radius: 16px;
  padding: 16px; background: #FBF9FF; opacity: .5;
}
.ach.on { opacity: 1; border-color: #0B0B0D; box-shadow: 4px 4px 0 #0B0B0D; background: var(--card); }
.ach b { display: block; font-size: 28px; line-height: 1; }
.ach span { display: block; margin-top: 8px; font-weight: 900; font-size: 14px; }
.ach small { display: block; margin-top: 5px; font-size: 11.5px; color: var(--muted); }

/* --- расписание: неделя по будням ---------------------------------------- */
.pageWrap.wide { max-width: 1240px; }

.weekBar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin-top: 22px;
}
.weekBar b { font-size: 15px; font-weight: 1000; }
.mini.off { opacity: .35; cursor: default; }
a.mini { text-decoration: none; display: inline-block; }

.weekGrid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px; margin-top: 14px;
}
.dayCol {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 18px;
  padding: 12px; min-width: 0;
}
.dayCol.today { border-color: #0B0B0D; box-shadow: 4px 4px 0 #0B0B0D; }
.dayCol.past { opacity: .5; }
.dayHead { text-align: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.dayHead b { display: block; font-size: 15px; font-weight: 1000; text-transform: uppercase; }
.dayHead span { display: block; font-size: 12px; color: var(--muted); }
.dayHead small {
  display: block; margin-top: 4px; font-family: var(--mono); font-size: 9.5px;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
}
.daySlots { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.slotForm { display: block; }

.timeSlot {
  width: 100%; border: 1.5px solid var(--line); border-radius: 11px;
  padding: 8px 6px; background: #FBF9FF; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-family: var(--sans); transition: .14s;
}
.timeSlot b { font-size: 13.5px; font-weight: 900; color: var(--ink); }
.timeSlot span { font-family: var(--mono); font-size: 9px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); }
.timeSlot.free { cursor: pointer; }
.timeSlot.free:hover { border-color: #0B0B0D; background: var(--lime); transform: translateY(-2px); }
.timeSlot.mine { cursor: pointer; background: var(--lime); border-color: #0B0B0D;
  box-shadow: 3px 3px 0 #0B0B0D; }
.timeSlot.mine span { color: #0B0B0D; }
.timeSlot.busy { background: #F2ECE5; }
.timeSlot.gone { background: transparent; border-style: dashed; opacity: .5; }
.busyWho { display: flex; gap: 3px; justify-content: center; }
.personAvatar.tiny {
  width: 22px; height: 22px; border-width: 2px; font-size: 10px; font-weight: 900;
  display: grid; place-items: center; color: #fff; border-radius: 50%;
}

@media (max-width: 900px) {
  .weekGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .weekGrid { grid-template-columns: 1fr; }
  .daySlots { flex-direction: row; flex-wrap: wrap; }
  .timeSlot { width: auto; min-width: 78px; }
}

/* время на плитке ближайшего дня, главная */
.slotTime {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .05em;
  opacity: .8; margin-bottom: 2px;
}
a.bigSlot { text-decoration: none; }

/* --- вход и регистрация -------------------------------------------------- */
.authWrap { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.authHero { text-align: center; margin-bottom: 26px; }
.authHero h1 {
  font-size: clamp(38px, 8vw, 96px); font-weight: 1000; letter-spacing: -.045em;
  line-height: .9; text-transform: uppercase; white-space: nowrap;
}
.authHero .tag {
  font-family: var(--mono); font-size: clamp(13px, 2vw, 20px); font-weight: 700;
  margin-top: 12px; display: flex; gap: 12px; justify-content: center;
}
.authHero .tag .sp { color: var(--orange); }
.authCard {
  width: min(420px, 100%); background: var(--card); border: 2.5px solid #0B0B0D;
  box-shadow: 6px 6px 0 #0B0B0D; border-radius: 22px; padding: 26px;
}
.authCard h2 { font-size: 24px; font-weight: 1000; text-transform: uppercase; letter-spacing: -.02em; }
.authCard .go { background: #0B0B0D; }

/* --- шапка проекта: возврат, название, шестерёнка и шаги одним блоком ----
   Раньше это были три отдельные полосы: липкая строка сверху, цветной блок
   с названием и полоса шагов, прижатая к низу экрана. Теперь всё в одном
   блоке — видно, к какому проекту относится прогресс. */
.pheadForm {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding-top: clamp(14px, 2.2vw, 20px);
  /* Ноль снизу: полоса шагов ложится вплотную к нижнему краю блока. */
  padding-bottom: 0;
  /* Те же поля, что у .wrap ниже, — иначе шапка и шаги идут по разным линиям. */
  padding-left: 20px;
  padding-right: 20px;
  /* В прототипе блок растягивался на 100vw, потому что лежал внутри полей.
     Здесь он и так во всю ширину, а 100vw шире экрана на полосу прокрутки —
     от этого шапка съезжала левее шагов на её толщину. */
  width: auto;
  margin-left: 0;
  margin-right: 0;
}
/* Содержимое шапки встаёт в ту же колонку, что и шаги: 1000px минус поля .wrap. */
.pheadForm > * { width: 100%; max-width: 960px; margin-left: auto; margin-right: auto; }

/* Верхняя строка блока: возврат слева, шестерёнка справа. */
.pheadTop { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Обёртка держит колонку, ссылка внутри — только по ширине надписи,
   иначе кликабельной стала бы вся строка. */
.pheadBack {
  display: inline-flex; align-items: center;
  color: rgba(255, 255, 255, .82); font-size: 13px; font-weight: 700;
  text-decoration: none; padding: 4px 0;
}
.pheadBack:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

.pheadMain {
  display: flex; align-items: center; gap: clamp(16px, 2.5vw, 24px);
  flex-wrap: wrap; margin-top: clamp(12px, 2vw, 20px);
}
.pheadText { flex: 1; min-width: 0; }

.pheadGear {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 17px; text-decoration: none;
  color: #fff; background: rgba(0, 0, 0, .28); border: 1.5px solid rgba(255, 255, 255, .35);
  transition: .15s;
}
.pheadGear:hover { background: rgba(0, 0, 0, .45); transform: rotate(45deg); }

/* Полоса шагов — тёмная лента вдоль всего низа блока. Сама лента во всю
   ширину, а надписи внутри идут по той же колонке, что и шаги ниже. */
.pheadForm .progbar {
  position: static; z-index: auto;
  max-width: none; border: 0; border-radius: 0;
  background: #15151A;
  /* Выходим за поля шапки, чтобы лента шла от края до края. Ширину задаём
     явно: общее для детей шапки width:100% считает её без учёта полей,
     и справа не хватало ровно этих 40 px. */
  margin: clamp(16px, 2.5vw, 24px) -20px 0;
  width: calc(100% + 40px);
  padding: 12px 20px;
  display: block;
}
.progbarInner {
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; gap: clamp(12px, 2.4vw, 22px);
}

/* Звёздочку из макета убираем: её угол занят шестерёнкой. */
.pheadForm::after { display: none; }

/* --- аватар: фото либо кружок с буквой ----------------------------------- */
.avatar, .tb2av, .personAvatar, .avatarPreview { overflow: hidden; }
.avatar img, .tb2av img, .personAvatar img, .avatarPreview img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block;
}

.avatarEdit { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.avatarPreview {
  width: 104px; height: 104px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff;
  font-size: 40px; font-weight: 1000; line-height: 1;
  border: 3px solid #0B0B0D; box-shadow: 5px 5px 0 #0B0B0D;
}
.avatarEditSide { flex: 1 1 260px; min-width: 0; }
.avatarFile input[type=file] { width: 100%; font-size: 13px; }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid transparent;
  cursor: pointer; padding: 0;
}
.swatch.on { border-color: #0B0B0D; box-shadow: 3px 3px 0 #0B0B0D; }
.swatchOwn { display: inline-flex; }
.swatchOwn input[type=color] {
  width: 44px; height: 34px; padding: 2px; border-radius: 10px;
  border: 1.5px solid var(--line); cursor: pointer; background: #fff;
}

/* --- формы настроек ------------------------------------------------------ */
.radioRow ul { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; }
.radioRow label { display: flex; align-items: center; gap: 7px; font-size: 13.5px; cursor: pointer; }
.radioRow input { width: auto; }
.checkRow { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.checkRow input { width: auto; }
.thumb form { position: absolute; top: 3px; right: 3px; }

/* --- подпись про данные -------------------------------------------------- */
.privacyNote {
  background: #0E0F13; color: #8E88A8; font-size: 12px; line-height: 1.6;
  padding: 22px 30px 40px; text-align: center;
}
.privacyNote a { color: var(--lime); }

/* --- плеер --------------------------------------------------------------- */
/* --- «сейчас играет» в углу, на каждой странице ------------------------- */
.nowPlaying {
  position: fixed; left: 20px; bottom: 20px; z-index: 60;
  display: flex; align-items: center; gap: 12px;
  background: var(--card); color: var(--ink);
  border: 2.5px solid #0B0B0D; box-shadow: 6px 6px 0 #0B0B0D;
  border-radius: 18px; padding: 10px 12px; width: min(330px, calc(100vw - 40px));
}
.nowPlaying[hidden] { display: none; }
/* Карточку можно перетащить куда удобно, двойной клик вернёт её в угол. */
.nowPlaying { cursor: grab; touch-action: none; user-select: none; }
.nowPlaying.dragging { cursor: grabbing; box-shadow: 10px 10px 0 #0B0B0D; }
.nowPlaying button { cursor: pointer; }
body.dark .nowPlaying { background: #17171C; color: #EFEAFF; }

.npCover {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  background: var(--lime); display: flex; align-items: flex-end;
  justify-content: center; gap: 3px; padding-bottom: 11px;
}
.npCover i { width: 4px; height: 7px; border-radius: 2px; background: #0B0B0D; }
.nowPlaying.playing .npCover i { animation: eq .9s ease-in-out infinite; }
.nowPlaying.playing .npCover i:nth-child(2) { animation-delay: .15s; }
.nowPlaying.playing .npCover i:nth-child(3) { animation-delay: .3s; }

.npText { flex: 1; min-width: 0; }
.npText b {
  display: block; font-size: 13px; font-weight: 800; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.npText small {
  display: block; font-size: 11px; color: var(--muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.dark .npText small { color: #8E88A8; }

.npBtn {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid #0B0B0D; background: transparent; color: inherit; font-size: 13px;
}
.npBtn:disabled { opacity: .3; cursor: not-allowed; }
.npPlay { background: #0B0B0D; color: #fff; border-color: #0B0B0D; }
.npFold { width: 26px; height: 26px; border-style: dashed; font-size: 12px; }

.nowPlaying.folded { width: auto; }
.nowPlaying.folded .npText,
.nowPlaying.folded [data-player-next] { display: none; }

@media (max-width: 560px) {
  .nowPlaying { left: 12px; right: 12px; bottom: 12px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .nowPlaying.playing .npCover i { animation: none; }
}

.player .skip {
  background: transparent; color: #111; border: 1.5px solid #111;
  width: 34px; height: 34px; font-size: 13px;
}
.player button:disabled { opacity: .35; cursor: not-allowed; }

/* --- глаза и плеер по сетке проектов -------------------------------------
   Цветные полосы остаются во всю ширину, а их содержимое встаёт в ту же
   колонку, что и карточки проектов: глаза — по левому краю колонки,
   плеер — по правому. Ширину колонки считает artflow.js (--ac-gutter),
   потому что 100vw включает полосу прокрутки и промахивается на ~7 px. */
:root { --ac-gutter: max(24px, calc((100vw - 1100px) / 2)); }

.eyes {
  align-items: flex-start !important;
  justify-content: center;
  padding-left: var(--ac-gutter) !important;
  padding-right: 20px !important;
  text-align: left;
}
.eyerow { justify-content: flex-start; }
.eyecap, .eyesub { text-align: left; }

.playlist { padding-right: var(--ac-gutter); }
.player { max-width: none; }

/* --- моргание глаз ------------------------------------------------------- */
.eyerow.blink .eye { transform: scaleY(.12); transition: transform .08s ease; }
.eyerow .eye { transition: transform .12s ease; }
.eyes.vibe .eyerow { animation: eyeBob .45s ease-in-out infinite alternate; }
@keyframes eyeBob { from { transform: translateY(0); } to { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) {
  .eyes.vibe .eyerow, .tris i { animation: none; }
}

/* --- мелочи -------------------------------------------------------------- */
.err {
  background: #FFEBF3; color: #B0154A; border-radius: 12px; padding: 12px 14px;
  font-size: 13.5px; margin-top: 12px;
}
body.dark .err { background: #2A1220; color: #FF8FBB; }
.link { background: none; border: 0; color: var(--muted); font-size: 13px;
  text-decoration: underline; text-underline-offset: 3px; width: 100%; }
body.dark .link { color: #8E88A8; }
.an { border-top: 1px solid var(--line); padding: 11px 0; font-size: 13.5px; }
.an b { font-weight: 800; }
.an div { color: var(--muted); margin-top: 3px; }
body.dark .an { border-color: #2A2A33; }
body.dark .an div { color: #8E88A8; }
