/* Гнёздышко — дизайн v3 «стикер / нео-брутал».
   Скоуп: html[data-design="v3"]. Не трогает старые страницы. */

html[data-design="v3"] {
  /* ── чернила, бумага ── */
  --v3-ink: #17130d;
  --v3-ink-2: #4b4237;
  --v3-ink-soft: #8b8070;
  --v3-base: #f4efe0;
  --v3-base-2: #ebe4d1;
  --v3-card: #fffdf6;
  --v3-card-2: #f8f3e4;

  /* ── палитра акцентов (мульти-акцент) ── */
  --v3-lime: #cdf564;
  --v3-coral: #ff9d76;
  --v3-sky: #8ec9ff;
  --v3-violet: #c4a7ff;
  --v3-pink: #ff9ec8;
  --v3-amber: #ffd24a;
  --v3-mint: #79e3bd;
  --v3-blue: #a3b7ff;
  --v3-red: #ff7d6b;
  --v3-accent: var(--v3-lime);

  /* ── геометрия ── */
  --v3-line: 2.5px;
  --v3-line-2: 2px;
  --v3-r-xl: 32px;
  --v3-r-lg: 26px;
  --v3-r-md: 20px;
  --v3-r-sm: 14px;
  --v3-r-pill: 999px;
  --v3-shadow: 4px 4px 0 var(--v3-ink);
  --v3-shadow-sm: 3px 3px 0 var(--v3-ink);
  --v3-shadow-lg: 6px 6px 0 var(--v3-ink);
  --v3-tabbar-h: 68px;

  background-color: var(--v3-base);
  color-scheme: light;
}

html[data-design="v3"] body {
  background-color: var(--v3-base);
  background-image: radial-gradient(rgba(23, 19, 13, 0.045) 1.1px, transparent 1.1px);
  background-size: 22px 22px;
  color: var(--v3-ink);
}

html[data-design="v3"] body::before {
  display: none;
}

/* ── секции → акцент ── */
.v3-root[data-accent="lime"] { --v3-accent: var(--v3-lime); }
.v3-root[data-accent="coral"] { --v3-accent: var(--v3-coral); }
.v3-root[data-accent="sky"] { --v3-accent: var(--v3-sky); }
.v3-root[data-accent="violet"] { --v3-accent: var(--v3-violet); }
.v3-root[data-accent="pink"] { --v3-accent: var(--v3-pink); }
.v3-root[data-accent="amber"] { --v3-accent: var(--v3-amber); }
.v3-root[data-accent="mint"] { --v3-accent: var(--v3-mint); }
.v3-root[data-accent="blue"] { --v3-accent: var(--v3-blue); }
.v3-root[data-accent="red"] { --v3-accent: var(--v3-red); }

/* ════════════════════════════════════════════
   Примитивы
   ════════════════════════════════════════════ */

.v3-card {
  position: relative;
  border: var(--v3-line) solid var(--v3-ink);
  border-radius: var(--v3-r-lg);
  background: var(--v3-card);
  box-shadow: var(--v3-shadow);
}

.v3-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--v3-ink);
}

.v3-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: var(--v3-line) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-ink);
  color: #fffdf6;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--v3-shadow-sm);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.v3-btn:hover { transform: translate(-1px, -1px); box-shadow: var(--v3-shadow); }
.v3-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--v3-ink); }

.v3-btn--accent {
  background: var(--v3-accent);
  color: var(--v3-ink);
}

.v3-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: var(--v3-line) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card);
  color: var(--v3-ink);
  box-shadow: var(--v3-shadow-sm);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.v3-iconbtn:hover { transform: translate(-1px, -1px); box-shadow: var(--v3-shadow); }
.v3-iconbtn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--v3-ink); }

.v3-icon {
  display: block;
  object-fit: contain;
}
/* PNG/SVG-иконки приложений делаем чёрными силуэтами, если это не кастомный data-URL */
.v3-icon--ink { filter: brightness(0) saturate(100%); }

/* ════════════════════════════════════════════
   Навигация
   ════════════════════════════════════════════ */

.page.v3-root:not(.page--studio) {
  padding-bottom: calc(var(--v3-tabbar-h) + 30px + env(safe-area-inset-bottom));
  min-height: 0;
}

/* ── мобильный нижний таб-бар ── */
.v3-tabbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 60;
  border: var(--v3-line) solid var(--v3-ink);
  border-radius: 26px;
  background: var(--v3-card);
  box-shadow: var(--v3-shadow);
}

.v3-tabbar-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: center;
  margin: 0;
  padding: 7px;
  list-style: none;
}

.v3-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 2px;
  border-radius: 18px;
  color: var(--v3-ink-soft);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.v3-tab__ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 30px;
  border-radius: 14px;
  transition: background 0.18s ease;
}

.v3-tab__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-tab--active {
  color: var(--v3-ink);
}
.v3-tab--active .v3-tab__ico {
  background: var(--v3-accent);
  border: var(--v3-line-2) solid var(--v3-ink);
  box-shadow: 2px 2px 0 var(--v3-ink);
}
.v3-tab--active .v3-tab__label { font-weight: 700; }

/* ── десктопный верхний бар ── */
.v3-topbar {
  display: none;
}

@media (min-width: 960px) {
  .v3-tabbar { display: none; }

  .page.v3-root:not(.page--studio) {
    padding-bottom: 40px;
  }

  .v3-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: -32px -32px 8px;
    padding: 14px 32px;
    border-bottom: var(--v3-line) solid var(--v3-ink);
    background: var(--v3-base);
    position: sticky;
    top: 0;
    z-index: 60;
  }

  .v3-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--v3-ink);
  }

  .v3-brand__mark {
    display: flex;
    width: 42px;
    height: 42px;
    border: var(--v3-line) solid var(--v3-ink);
    border-radius: var(--v3-r-pill);
    overflow: hidden;
    background: var(--v3-card);
    box-shadow: var(--v3-shadow-sm);
  }
  .v3-brand__mark img { width: 100%; height: 100%; object-fit: cover; }

  .v3-brand__name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  .v3-topnav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 auto;
    padding: 6px;
    border: var(--v3-line) solid var(--v3-ink);
    border-radius: var(--v3-r-pill);
    background: var(--v3-card);
    box-shadow: var(--v3-shadow-sm);
  }

  .v3-topnav__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: var(--v3-r-pill);
    color: var(--v3-ink-2);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.16s ease, color 0.16s ease;
  }
  .v3-topnav__item:hover { background: var(--v3-card-2); }
  .v3-topnav__item--active {
    background: var(--v3-accent);
    border: var(--v3-line-2) solid var(--v3-ink);
    box-shadow: 2px 2px 0 var(--v3-ink);
    color: var(--v3-ink);
    font-weight: 700;
  }
}

/* ════════════════════════════════════════════
   Главная
   ════════════════════════════════════════════ */

.page--home.v3-root {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  padding-bottom: calc(var(--v3-tabbar-h) + 30px + env(safe-area-inset-bottom));
}

.v3-home {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.v3-home-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 960px) {
  .v3-home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 20px;
    align-items: start;
  }
  .v3-home-watch { grid-column: 1; grid-row: 1 / span 3; }
  .v3-home-tasks { grid-column: 2; grid-row: 1; }
  .v3-home-apps { grid-column: 2; grid-row: 2; }
  .v3-home-note { grid-column: 2; grid-row: 3; }
  .v3-app__ico { max-width: 78px; }
  .page--home.v3-root { padding-bottom: 40px; }
}

/* ── hero ── */
.v3-hero {
  position: relative;
  overflow: hidden;
  border: var(--v3-line) solid var(--v3-ink);
  border-radius: var(--v3-r-xl);
  background: var(--v3-accent);
  box-shadow: var(--v3-shadow-lg);
  padding: 22px 22px 26px;
}

.v3-hero__date {
  display: inline-block;
  padding: 4px 12px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card);
  font-size: 12px;
  font-weight: 700;
  text-transform: lowercase;
}

.v3-hero__title {
  margin: 14px 0 0;
  padding-right: 68px;
  font-size: 34px;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--v3-ink);
}

.v3-hero__title em {
  font-style: normal;
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-underline-offset: 3px;
}

.v3-hero__sub {
  margin: 10px 0 0;
  max-width: 34ch;
  font-size: 14px;
  font-weight: 400;
  color: var(--v3-ink-2);
}

.v3-stamp {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 50%;
  background: var(--v3-card);
  box-shadow: var(--v3-shadow-sm);
  color: var(--v3-ink);
  rotate: -8deg;
  pointer-events: none;
}

.v3-stamp::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px dashed var(--v3-ink);
  border-radius: 50%;
  opacity: 0.35;
}

.v3-stamp svg {
  display: block;
}

@media (min-width: 960px) {
  .v3-hero { padding: 30px 32px 34px; }
  .v3-hero__title { font-size: 46px; }
  .v3-hero__title,
  .v3-hero__sub { padding-right: 0; }
}

/* ── карточка-секция ── */
.v3-sec {
  padding: 18px;
}

.v3-sec__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.v3-sec__dot {
  width: 14px;
  height: 14px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 5px;
  background: var(--v3-accent);
  flex-shrink: 0;
}
.v3-sec--coral .v3-sec__dot { background: var(--v3-coral); border-radius: var(--v3-r-pill); }
.v3-sec--sky .v3-sec__dot { background: var(--v3-sky); border-radius: var(--v3-r-pill); }
.v3-sec--amber .v3-sec__dot { background: var(--v3-amber); }
.v3-sec--violet .v3-sec__dot { background: var(--v3-violet); border-radius: 50% 50% 50% 0; }

.v3-sec__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.v3-sec__link {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--v3-ink-2);
  text-decoration: none;
  border-bottom: var(--v3-line-2) solid transparent;
  padding-bottom: 1px;
}
.v3-sec__link:hover { border-bottom-color: var(--v3-ink); color: var(--v3-ink); }

/* ── дела ── */
.v3-seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card-2);
}

.v3-seg__btn {
  padding: 5px 14px;
  border: var(--v3-line-2) solid transparent;
  border-radius: var(--v3-r-pill);
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--v3-ink-2);
  cursor: pointer;
}
.v3-seg__btn--on {
  background: var(--v3-accent);
  border-color: var(--v3-ink);
  color: var(--v3-ink);
  font-weight: 700;
}

.v3-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v3-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card);
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-task__check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 7px;
  background: var(--v3-card);
  cursor: pointer;
  padding: 0;
}
.v3-task__check--on {
  background: var(--v3-accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317130d' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6'/%3E%3C/svg%3E");
  background-size: 16px;
  background-position: center;
  background-repeat: no-repeat;
}

.v3-task__text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--v3-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v3-task--done .v3-task__text { color: var(--v3-ink-soft); text-decoration: line-through; }

.v3-task__time {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--v3-ink-2);
}

.v3-empty {
  margin: 4px 0;
  padding: 14px;
  border: var(--v3-line-2) dashed var(--v3-ink-soft);
  border-radius: var(--v3-r-sm);
  font-size: 13px;
  color: var(--v3-ink-soft);
  text-align: center;
}

/* ── смотреть ── */
.v3-watch {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 104px;
  gap: 10px;
  overflow-x: auto;
  margin: 0 -18px;
  padding: 2px 18px 8px;
  scrollbar-width: none;
}
.v3-watch::-webkit-scrollbar { display: none; }

.v3-watch__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--v3-ink);
}

.v3-watch__poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  overflow: hidden;
  background: var(--v3-card-2);
  box-shadow: 3px 3px 0 var(--v3-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--v3-ink-soft);
}
.v3-watch__poster img { width: 100%; height: 100%; object-fit: cover; }

.v3-watch__badge {
  position: absolute;
  left: 5px;
  bottom: 5px;
  padding: 2px 7px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-lime);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.3;
}
.v3-watch__badge--done { background: var(--v3-mint); }
.v3-watch__badge--queue { background: var(--v3-amber); }

.v3-watch__name {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── приложения ── */
.v3-apps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.v3-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--v3-ink);
  min-width: 0;
}

.v3-app__ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  max-width: 62px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-md);
  background: var(--v3-card);
  box-shadow: var(--v3-shadow-sm);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.v3-app:hover .v3-app__ico { transform: translate(-1px, -1px); box-shadow: var(--v3-shadow); }
.v3-app:active .v3-app__ico { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--v3-ink); }

.v3-app__ico img {
  width: 62%;
  height: 62%;
  object-fit: contain;
}

.v3-app__name {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.15;
  text-align: center;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── заметка ── */
.v3-note {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: var(--v3-line) solid var(--v3-ink);
  border-radius: var(--v3-r-lg);
  background: var(--v3-amber);
  box-shadow: var(--v3-shadow);
  text-decoration: none;
  color: var(--v3-ink);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.v3-note:hover { transform: translate(-1px, -1px); box-shadow: var(--v3-shadow-lg); }
.v3-note:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--v3-ink); }

.v3-note__ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border: var(--v3-line) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card);
  box-shadow: var(--v3-shadow-sm);
}

.v3-note__title { font-size: 17px; font-weight: 700; }
.v3-note__sub { font-size: 12px; color: var(--v3-ink-2); }

/* ── splash-loading ── */
.v3-loading {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--v3-ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  .v3-btn, .v3-iconbtn, .v3-app__ico, .v3-note { transition: none; }
}

/* ════════════════════════════════════════════
   Page-kit — общие блоки внутренних страниц
   ════════════════════════════════════════════ */

.v3-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.v3-push { margin-left: auto; }

/* ── шапка страницы ── */
.v3-pagehead {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.v3-pagehead__main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.v3-pagehead__eyebrow {
  align-self: flex-start;
  padding: 5px 12px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-accent);
  box-shadow: 2px 2px 0 var(--v3-ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.v3-pagehead__title {
  margin: 0;
  font-size: 30px;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.v3-pagehead__title em {
  font-style: normal;
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-underline-offset: 3px;
}

.v3-pagehead__sub {
  margin: 0;
  max-width: 48ch;
  font-size: 13px;
  line-height: 1.4;
  color: var(--v3-ink-2);
}

.v3-pagehead__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.v3-pagehead__actions .v3-btn { flex: 1; }

@media (min-width: 960px) {
  .v3-pagehead {
    flex-direction: row;
    align-items: flex-end;
    gap: 20px;
  }
  .v3-pagehead__title { font-size: 40px; }
  .v3-pagehead__actions { margin-left: auto; padding-bottom: 4px; }
  .v3-pagehead__actions .v3-btn { flex: 0 0 auto; }
}

/* ── модификаторы примитивов ── */
.v3-btn--sm {
  min-height: 38px;
  padding: 0 14px;
  gap: 6px;
  font-size: 13px;
}

.v3-btn--ghost {
  background: var(--v3-card);
  color: var(--v3-ink);
}

.v3-iconbtn--sm { width: 36px; height: 36px; }

.v3-chip--accent {
  background: var(--v3-accent);
  font-weight: 700;
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card-2);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}
.v3-pill--accent { background: var(--v3-accent); }

/* ── поля ввода ── */
.v3-field { display: block; margin: 0 0 14px; }

.v3-field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--v3-ink-2);
}

.v3-input {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card);
  box-shadow: 2px 2px 0 var(--v3-ink);
  color: var(--v3-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.v3-input::placeholder { color: var(--v3-ink-soft); }
.v3-input:focus-visible {
  background: #fff;
  box-shadow: var(--v3-shadow-sm);
}
.v3-input--area {
  padding: 12px 14px;
  min-height: 96px;
  line-height: 1.4;
  resize: vertical;
}

/* ── модалка ── */
.v3-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  background: rgba(23, 19, 13, 0.42);
}

.v3-modal__card {
  width: 100%;
  max-width: 460px;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 20px;
  border: var(--v3-line) solid var(--v3-ink);
  border-radius: var(--v3-r-lg);
  background: var(--v3-card);
  box-shadow: var(--v3-shadow-lg);
}

.v3-modal__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.v3-modal__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.v3-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.v3-modal__actions > * { flex: 1; }

@media (min-width: 640px) {
  .v3-modal { align-items: center; }
}

/* ── календарь ── */
.v3-cal { display: flex; flex-direction: column; gap: 14px; }

.v3-cal__nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.v3-cal__month {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.v3-cal__year { color: var(--v3-ink-soft); font-weight: 500; }

.v3-cal__dow {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.v3-cal__dow span {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--v3-ink-soft);
}

.v3-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.v3-cal__day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  padding: 0;
  border: var(--v3-line-2) solid transparent;
  border-radius: 12px;
  background: var(--v3-card-2);
  color: var(--v3-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.v3-cal__day--empty { background: transparent; cursor: default; }
.v3-cal__day--today { border-color: var(--v3-ink); border-style: dashed; }
.v3-cal__day--sel {
  background: var(--v3-accent);
  border-color: var(--v3-ink);
  border-style: solid;
  font-weight: 700;
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-cal__dot {
  position: absolute;
  bottom: 5px;
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--v3-ink);
  border-radius: 50%;
  background: var(--v3-accent);
}
.v3-cal__dot--done { background: var(--v3-mint); }

/* ── список задач на странице напоминаний ── */
.v3-rem-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 960px) {
  .v3-rem-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 20px;
    align-items: start;
  }
}

.v3-rem-date {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.v3-rem-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--v3-ink-soft);
}

.v3-task__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.v3-task__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── категории приложений ── */
.v3-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 2px 0;
}

.v3-cat__name {
  padding: 7px 14px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-accent);
  box-shadow: 2px 2px 0 var(--v3-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--v3-ink);
}

.v3-cat__count {
  padding: 5px 10px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: var(--v3-ink-2);
}

/* ── лаунчер: карточки-стикеры ── */
.v3-launch {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.v3-launch__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 13px 14px;
  border: var(--v3-line) solid var(--v3-ink);
  border-radius: var(--v3-r-md);
  background: var(--v3-card);
  box-shadow: var(--v3-shadow-sm);
  text-decoration: none;
  color: var(--v3-ink);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.v3-launch__item:hover { transform: translate(-1px, -1px); box-shadow: var(--v3-shadow); }
.v3-launch__item:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--v3-ink); }

.v3-launch__ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 16px;
  background: var(--v3-card-2);
  box-shadow: 2px 2px 0 var(--v3-ink);
  rotate: -2.5deg;
  transition: rotate 0.14s ease;
}
.v3-launch__item:hover .v3-launch__ico { rotate: 2.5deg; }
.v3-launch__ico img { width: 64%; height: 64%; object-fit: contain; }

.v3-launch__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.v3-launch__name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-launch__desc {
  font-size: 11px;
  line-height: 1.3;
  color: var(--v3-ink-soft);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.v3-launch__arrow {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--v3-ink-soft);
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}
.v3-launch__item:hover .v3-launch__arrow { opacity: 1; transform: none; }

.v3-launch__ico[data-underlay="base"] { background: var(--v3-card-2); }
.v3-launch__ico[data-underlay="white"] { background: #fff; }
.v3-launch__ico[data-underlay="lime"] { background: var(--v3-lime); }
.v3-launch__ico[data-underlay="black"] { background: var(--v3-ink); }

.v3-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.v3-seg--flush { margin-bottom: 0; }

/* ════════════════════════════════════════════
   Страницы: работа / кодинг / загрузки / смотреть
   ════════════════════════════════════════════ */

/* ── общее: заблокированные кнопки на новых страницах ── */
.v3-work .v3-btn:disabled,
.v3-coding .v3-btn:disabled,
.v3-coding-ide .v3-btn:disabled,
.v3-dl .v3-btn:disabled,
.v3-dl .v3-iconbtn:disabled,
.v3-watchp .v3-btn:disabled,
.v3-watchp .v3-iconbtn:disabled,
.v3-watchd .v3-btn:disabled,
.v3-watchd .v3-iconbtn:disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* ── общее: спиннер и плашка ошибки ── */
@keyframes v3-spin {
  to { transform: rotate(360deg); }
}
.v3-spin { animation: v3-spin 0.9s linear infinite; }

.v3-alert {
  margin: 0;
  padding: 10px 14px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-red);
  box-shadow: 2px 2px 0 var(--v3-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--v3-ink);
}

/* ── v3: работа ── */
.v3-work__note { padding: 18px; }
.v3-work__note .v3-empty { margin: 0; }

.v3-work__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 960px) {
  .v3-work__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.v3-work__tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
}

.v3-work__tile-dot {
  width: 16px;
  height: 16px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 6px;
  background: var(--v3-accent);
  box-shadow: 2px 2px 0 var(--v3-ink);
}
.v3-work__tile:nth-child(2) .v3-work__tile-dot { background: var(--v3-coral); border-radius: 50%; }
.v3-work__tile:nth-child(3) .v3-work__tile-dot { background: var(--v3-sky); border-radius: 50% 50% 50% 0; }
.v3-work__tile:nth-child(4) .v3-work__tile-dot { background: var(--v3-violet); border-radius: 4px; }

.v3-work__tile-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.v3-work__tile-empty { width: 100%; margin: 0; }

/* ── v3: кодинг ── */
.v3-coding__grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
@media (min-width: 960px) {
  .v3-coding__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
  }
}

.v3-coding__card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.v3-coding__main {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.v3-coding__ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-accent);
  box-shadow: 2px 2px 0 var(--v3-ink);
  rotate: -3deg;
  color: var(--v3-ink);
}

.v3-coding__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.v3-coding__name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-coding__dir {
  font-size: 11px;
  color: var(--v3-ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-coding__git {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.v3-coding__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.v3-coding__actions .v3-btn { flex: 0 0 auto; }

.v3-coding__sessions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.v3-coding__session {
  max-width: 100%;
  justify-content: flex-start;
}
.v3-coding__session > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.v3-coding-ide {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: calc(100dvh - 64px);
}

.v3-coding-ide__toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 14px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card);
  box-shadow: var(--v3-shadow-sm);
}

.v3-coding-ide__name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.v3-coding-ide__path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--v3-ink-soft);
}

.v3-coding-ide__ext { flex-shrink: 0; text-decoration: none; color: var(--v3-ink); }

.v3-coding-ide__frame {
  display: block;
  flex: 1;
  min-height: 0;
  width: 100%;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-md);
  background: #0a0a0a;
}

@media (max-width: 640px) {
  .v3-coding-ide__path { display: none; }
}

/* ── v3: загрузки ── */
.v3-dl__wrap {
  display: flex;
  justify-content: center;
}

.v3-dl__card {
  width: 100%;
  max-width: 520px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.v3-dl__row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.v3-dl__row .v3-input { flex: 1; min-width: 0; }

.v3-dl__clear { flex-shrink: 0; }

.v3-dl__actions {
  display: flex;
  gap: 10px;
}
.v3-dl__actions .v3-btn { flex: 1; }

.v3-dl__err { margin: 0; }
.v3-dl__ok { align-self: flex-start; background: var(--v3-mint); }

.v3-dl__hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--v3-ink-soft);
}

/* ── v3: смотреть ── */
.v3-watchp__add {
  display: flex;
  gap: 10px;
}
.v3-watchp__add .v3-input { flex: 1; min-width: 0; }
.v3-watchp__add .v3-btn { flex-shrink: 0; }

.v3-watchp__err { align-self: flex-start; }

.v3-watchp__filter { margin-bottom: 0; }

.v3-watchp__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 14px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v3-watchp__card .v3-watch__poster {
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.v3-watchp__card:hover .v3-watch__poster { transform: translate(-1px, -1px); box-shadow: var(--v3-shadow-sm); }
.v3-watchp__card:active .v3-watch__poster { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--v3-ink); }

.v3-watchp__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.v3-watchp__sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--v3-ink-soft);
}

.v3-watch__badge--watching { background: var(--v3-sky); }

.v3-watchp__close { margin-left: auto; flex-shrink: 0; }

.v3-watchp__q {
  margin: -8px 0 14px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--v3-ink-2);
}

.v3-watchp__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .v3-watchp__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.v3-watchp__pick {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 9px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card);
  box-shadow: 2px 2px 0 var(--v3-ink);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.v3-watchp__pick:hover { transform: translate(-1px, -1px); box-shadow: var(--v3-shadow-sm); }
.v3-watchp__pick:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--v3-ink); }

.v3-watchp__pick-poster { box-shadow: none; }

.v3-watchp__pick-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.v3-watchp__pick-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.v3-watchp__pick-sub {
  font-size: 10px;
  color: var(--v3-ink-soft);
}

/* ── v3: смотреть — модалка детализации ── */
.v3-watchd__body {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.v3-watchd__poster-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.v3-watchd__poster {
  width: 120px;
  box-shadow: var(--v3-shadow-sm);
}

.v3-watchd__change { width: 120px; }

.v3-watchd__perr { font-size: 11px; padding: 8px 10px; }

.v3-watchd__info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.v3-watchd__sub {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--v3-ink-2);
}

.v3-watchd__genres {
  margin: 0;
  font-size: 11px;
  color: var(--v3-ink-soft);
}

.v3-watchd__overview {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.v3-watchd__rate {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.v3-watchd__rate-label { margin-bottom: 0; }

.v3-watchd__rate-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.v3-watchd__rate-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 10px;
  background: var(--v3-card-2);
  color: var(--v3-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.v3-watchd__rate-btn--on {
  background: var(--v3-accent);
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-watchd__note { margin-bottom: 0; }

.v3-watchd__actions .v3-iconbtn {
  flex: 0 0 auto;
  color: var(--v3-ink);
}
.v3-watchd__actions .v3-btn { flex: 1; }

@media (max-width: 480px) {
  .v3-watchd__body { flex-direction: column; }
  .v3-watchd__poster-col { flex-direction: row; align-items: flex-start; }
  .v3-watchd__poster { width: 96px; }
}

/* ════════════════════════════════════════════
   v3: посылки (china)
   ════════════════════════════════════════════ */

.v3-pill--ok { background: var(--v3-mint); }
.v3-pill--warn { background: var(--v3-amber); }
.v3-pill--err { background: var(--v3-red); }

.v3-cn {
  width: 100%;
  max-width: 560px;
}

.v3-cn__banner {
  margin: 0;
  padding: 10px 14px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-amber);
  box-shadow: 2px 2px 0 var(--v3-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.v3-cn__form {
  padding: 18px;
}

.v3-cn__hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--v3-ink-soft);
}

.v3-cn__ferr {
  display: inline-block;
  margin: 6px 0 0;
  padding: 3px 10px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 10px;
  background: var(--v3-red);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.v3-cn__grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.v3-cn__value {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--v3-ink-2);
}
.v3-cn__value strong {
  color: var(--v3-ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.v3-cn__stores {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.v3-cn__stores .v3-seg__btn {
  flex: none;
  min-height: 44px;
  padding: 0 12px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card);
  font-size: 13px;
}
.v3-cn__stores .v3-seg__btn--on {
  background: var(--v3-accent);
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-cn__actions {
  display: flex;
}
.v3-cn__actions .v3-btn { width: 100%; }

.v3-cn__listwrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v3-cn__listhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.v3-cn__listtitle {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--v3-ink-soft);
}

.v3-cn__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v3-cn__item {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 15px 16px;
}

.v3-cn__itemtop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.v3-cn__itemtitle {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.v3-cn__itemmeta {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--v3-ink-2);
}

.v3-cn__itemlink {
  font-size: 12px;
  color: var(--v3-ink-2);
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}
.v3-cn__itemlink:hover { color: var(--v3-ink); }

.v3-cn__itemerr {
  align-self: flex-start;
  margin: 0;
  padding: 4px 10px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 10px;
  background: var(--v3-red);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.v3-cn__trackrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.v3-cn__trackrow .v3-input { flex: 1; min-width: 0; min-height: 40px; }
.v3-cn__trackrow .v3-btn { flex-shrink: 0; }

.v3-cn__retry {
  align-self: flex-start;
  margin-top: 2px;
}

@media (max-width: 480px) {
  .v3-cn__trackrow { flex-direction: column; align-items: stretch; }
  .v3-cn__trackrow .v3-btn { min-height: 44px; }
}

/* ════════════════════════════════════════════
   v3: заметки (notes)
   ════════════════════════════════════════════ */

.v3-notes {
  flex: 1;
  min-height: 0;
}

.v3-notes__cols {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(200px, 250px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.v3-notes__identify {
  padding: 16px 18px;
}
.v3-notes__identify-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.v3-notes__identify-desc {
  margin: 4px 0 12px;
  font-size: 13px;
  color: var(--v3-ink-2);
}
.v3-notes__identify-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v3-notes__side,
.v3-notes__editor {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.v3-notes__search {
  position: relative;
  padding: 12px 10px 8px;
}
.v3-notes__search-icon {
  position: absolute;
  left: 22px;
  top: calc(50% - 6px);
  transform: translateY(-50%);
  color: var(--v3-ink-soft);
  pointer-events: none;
}
.v3-notes__search-input {
  min-height: 42px;
  padding: 0 34px;
  font-size: 13px;
}
.v3-notes__search-clear {
  position: absolute;
  right: 16px;
  top: calc(50% - 6px);
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--v3-r-pill);
  background: transparent;
  color: var(--v3-ink-soft);
  cursor: pointer;
}
.v3-notes__search-clear:hover { color: var(--v3-ink); }

.v3-notes__folders {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 10px 10px;
}

.v3-notes__folder {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: var(--v3-line-2) solid transparent;
  border-radius: var(--v3-r-pill);
  background: var(--v3-card-2);
  color: var(--v3-ink-2);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}
.v3-notes__folder--on {
  border-color: var(--v3-ink);
  background: var(--v3-accent);
  color: var(--v3-ink);
  font-weight: 700;
  box-shadow: 2px 2px 0 var(--v3-ink);
}
.v3-notes__folder--add { color: var(--v3-ink-2); }
.v3-notes__folder-count {
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

.v3-notes__list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v3-notes__empty {
  margin: 18px 4px;
}

.v3-notes__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card-2);
  color: var(--v3-ink);
  font-family: inherit;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--v3-ink);
}
.v3-notes__item--on {
  background: var(--v3-accent);
}
.v3-notes__item[data-color] {
  box-shadow: 2px 2px 0 var(--v3-ink), inset 4px 0 0 var(--note-color, transparent);
}

.v3-notes__item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.v3-notes__item-title {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v3-notes__item-mark {
  flex-shrink: 0;
}

.v3-notes__item-when {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--v3-ink-2);
}

.v3-notes__item-preview {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--v3-ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.v3-notes__item-from {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 600;
}

.v3-notes__editorempty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  color: var(--v3-ink-soft);
  text-align: center;
}
.v3-notes__editorempty p { margin: 0; }

.v3-notes__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: var(--v3-line-2) solid var(--v3-ink);
}

.v3-notes__back { display: none; }

.v3-notes__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--v3-ink-2);
}

.v3-notes__saving {
  color: var(--v3-ink);
  font-weight: 700;
}

.v3-notes__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.v3-notes__colors {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 4px;
}

.v3-notes__color {
  width: 16px;
  height: 16px;
  padding: 0;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card-2);
  cursor: pointer;
}
.v3-notes__color--on {
  outline: 2px solid var(--v3-ink);
  outline-offset: 1px;
}

.v3-notes__folderset {
  width: auto;
  min-width: 0;
  max-width: 140px;
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
  box-shadow: none;
}

.v3-notes__sharebtn--on {
  background: var(--v3-accent);
}

.v3-notes__hint {
  margin: 0;
  font-size: 12px;
  color: var(--v3-ink-soft);
}

/* ── заметки: v3-переоформление редактора (NotesEditor) ── */
.v3-notes .notes-title-input {
  color: var(--v3-ink);
}
.v3-notes .notes-title-input::placeholder {
  color: var(--v3-ink-soft);
}
.v3-notes .notes-toolbar {
  border-bottom: var(--v3-line-2) solid var(--v3-ink);
}
.v3-notes .notes-tool {
  border-radius: 10px;
  color: var(--v3-ink-2);
}
.v3-notes .notes-tool:hover {
  background: var(--v3-base-2);
  color: var(--v3-ink);
}
.v3-notes .notes-tool--on {
  background: var(--v3-accent);
  color: var(--v3-ink);
  box-shadow: 1px 1px 0 var(--v3-ink);
}
.v3-notes .notes-tool-sep {
  background: rgba(23, 19, 13, 0.2);
}
.v3-notes .notes-prose {
  color: var(--v3-ink);
}
.v3-notes .notes-prose blockquote {
  border-left-color: var(--v3-accent);
  color: var(--v3-ink-2);
}
.v3-notes .notes-prose p.is-editor-empty:first-child::before {
  color: var(--v3-ink-soft);
}
.v3-notes .notes-link {
  color: var(--v3-ink);
  text-decoration-thickness: 2px;
}
.v3-notes .notes-img {
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 14px;
  box-shadow: 2px 2px 0 var(--v3-ink);
}
.v3-notes .notes-prose ul[data-type="taskList"] li > label input {
  accent-color: var(--v3-ink);
}
.v3-notes .notes-editor-loading {
  color: var(--v3-ink-soft);
}

@media (max-width: 860px) {
  .v3-notes__cols { grid-template-columns: minmax(0, 1fr); }
  .v3-notes__back { display: inline-flex; }
  .v3-notes:not(.v3-notes--editing) .v3-notes__editor { display: none; }
  .v3-notes--editing .v3-notes__side { display: none; }
  .v3-notes--editing .v3-notes__editor { flex: 1; }
}

@media (max-width: 767px) {
  .v3-notes__bar {
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 10px 8px;
  }
  .v3-notes__meta {
    flex: 1 1 auto;
    min-width: 0;
    gap: 6px;
    font-size: 11px;
  }
  .v3-notes__meta .v3-pill,
  .v3-notes__folderchip { display: none; }
  .v3-notes__actions {
    flex: 1 1 100%;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .v3-notes__colors {
    order: 0;
    margin: 0;
    flex: 1;
    justify-content: flex-start;
  }
  .v3-notes__folderset {
    max-width: 96px;
    flex-shrink: 0;
  }
}

/* ════════════════════════════════════════════
   v3: ai-чат
   ════════════════════════════════════════════ */

.v3-ai {
  flex: 1;
  min-height: 0;
}

.v3-ai__identify {
  padding: 16px 18px;
}
.v3-ai__identify-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.v3-ai__identify-desc {
  margin: 4px 0 12px;
  font-size: 13px;
  color: var(--v3-ink-2);
}
.v3-ai__identify-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v3-ai__shell {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 12px;
  position: relative;
}

.v3-ai__panel {
  flex: 0 0 250px;
  width: 250px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: var(--v3-line) solid var(--v3-ink);
  border-radius: var(--v3-r-lg);
  background: var(--v3-card);
  box-shadow: var(--v3-shadow-sm);
}

.v3-ai__panelhead {
  display: flex;
  align-items: center;
  gap: 8px;
}
.v3-ai__newchat {
  flex: 1;
  min-width: 0;
}

.v3-ai__panelclose,
.v3-ai__paneltoggle,
.v3-ai__backdrop {
  display: none;
}

.v3-ai__owner {
  margin: 0;
  padding: 0 4px;
  font-size: 12px;
  color: var(--v3-ink-2);
}
.v3-ai__owner strong { color: var(--v3-ink); }

.v3-ai__chatlist {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v3-ai__chatempty {
  padding: 16px 8px;
  text-align: center;
  font-size: 13px;
  color: var(--v3-ink-soft);
}

.v3-ai__chatitem {
  position: relative;
  display: flex;
  align-items: stretch;
}

.v3-ai__chatbtn {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 9px 64px 9px 11px;
  border: var(--v3-line-2) solid transparent;
  border-radius: var(--v3-r-sm);
  background: transparent;
  color: var(--v3-ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.v3-ai__chatbtn:hover { background: var(--v3-card-2); }
.v3-ai__chatitem--active .v3-ai__chatbtn {
  background: var(--v3-accent);
  border-color: var(--v3-ink);
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-ai__chattitle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v3-ai__sharedmark { flex-shrink: 0; }

.v3-ai__chatmeta {
  font-size: 11px;
  color: var(--v3-ink-2);
}

.v3-ai__chatactions {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: flex;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.v3-ai__chatitem:hover .v3-ai__chatactions,
.v3-ai__chatitem:focus-within .v3-ai__chatactions {
  opacity: 1;
  pointer-events: auto;
}

.v3-ai__sharebtn--on { background: var(--v3-accent); }

.v3-ai__rename {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  font-size: 13px;
}

.v3-ai__chat {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.v3-ai__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 14px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card);
  box-shadow: var(--v3-shadow-sm);
}

.v3-ai__mode { flex-shrink: 0; }

.v3-ai__modelpick {
  display: block;
  flex: 1;
  min-width: 140px;
}

.v3-ai__model {
  min-height: 38px;
  padding: 0 10px;
  font-size: 13px;
  box-shadow: none;
}

.v3-ai__modelnow {
  flex: 1 1 100%;
  margin: 0;
  font-size: 12px;
  color: var(--v3-ink-2);
}
.v3-ai__modelnow strong { color: var(--v3-ink); }

.v3-ai__log {
  flex: 1;
  min-height: 280px;
  max-height: min(58vh, 640px);
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.v3-ai__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  color: var(--v3-ink-soft);
  padding: 32px 16px;
}
.v3-ai__empty p {
  margin: 0;
  max-width: 300px;
  font-size: 14px;
  line-height: 1.4;
}

.v3-ai__msgs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.v3-ai-msg { display: flex; }
.v3-ai-msg--me { justify-content: flex-end; }

.v3-ai-msg__body {
  position: relative;
  max-width: min(92%, 560px);
  padding: 12px 14px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 18px;
  background: var(--v3-card);
  box-shadow: 2px 2px 0 var(--v3-ink);
}
.v3-ai-msg--me .v3-ai-msg__body {
  background: var(--v3-accent);
  border-bottom-right-radius: 6px;
}
.v3-ai-msg:not(.v3-ai-msg--me) .v3-ai-msg__body {
  border-bottom-left-radius: 6px;
  padding-top: 14px;
  padding-bottom: 30px;
}

.v3-ai-msg__body--pending {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px !important;
  color: var(--v3-ink-2);
}
.v3-ai-msg__body--pending .v3-ai-msg__tag { margin-left: 2px; }

.v3-ai-msg__text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.45;
}

.v3-ai-msg__meta {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.v3-ai-msg__tag {
  max-width: 55%;
  padding: 2px 7px;
  border: 1.5px solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--v3-ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-ai-msg__cost {
  margin-left: auto;
  flex-shrink: 0;
  padding: 2px 7px;
  border: 1.5px solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card-2);
  font-size: 10px;
  font-weight: 700;
  color: var(--v3-ink);
}

.v3-ai-msg__imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.v3-ai__imgwrap {
  position: relative;
  display: inline-block;
}

.v3-ai__imgbtn {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}

.v3-ai__img {
  display: block;
  max-width: min(240px, 70vw);
  max-height: 220px;
  width: auto;
  height: auto;
  object-fit: cover;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 12px;
}

.v3-ai__imgdl {
  position: absolute;
  top: 6px;
  right: 6px;
}

.v3-ai__pending {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v3-ai__pendingitem {
  position: relative;
  width: 56px;
  height: 56px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 12px;
  background: var(--v3-card-2);
  overflow: hidden;
}

.v3-ai__pendingthumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v3-ai__pendingrm {
  position: absolute;
  top: 2px;
  right: 2px;
}

.v3-ai__err { margin: 0; }

.v3-ai__composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.v3-ai__clear,
.v3-ai__attach {
  flex-shrink: 0;
  margin-bottom: 2px;
}

.v3-ai__input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  max-height: 140px;
  padding: 12px 14px;
  line-height: 1.4;
  resize: none;
}

.v3-ai__send {
  width: 48px;
  padding: 0;
  flex-shrink: 0;
}

/* ── ai: траты ── */
.v3-ai__usage {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.v3-ai__usagenote {
  margin: 0;
  font-size: 13px;
  color: var(--v3-ink-2);
}

.v3-ai__hero {
  padding: 22px 24px;
  background: var(--v3-accent);
}

.v3-ai__hero-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: lowercase;
}

.v3-ai__hero-sum {
  margin: 8px 0 0;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.v3-ai__hero-meta {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--v3-ink-2);
}

.v3-ai__block {
  padding: 16px 18px;
}

.v3-ai__blocktitle {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--v3-ink-soft);
}

.v3-ai__rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v3-ai__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card-2);
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-ai__row-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.v3-ai__row-meta {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--v3-ink-2);
}

.v3-ai__row-cost {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
}

/* ── ai: лайтбокс ── */
.v3-ai__lightbox {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 16px;
}

.v3-ai__lightbox-back {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(23, 19, 13, 0.55);
  cursor: pointer;
}

.v3-ai__lightbox-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: min(96vw, 920px);
  max-height: 92vh;
}

.v3-ai__lightbox-img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 64px);
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-md);
  background: var(--v3-card);
}

.v3-ai__lightbox-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 860px) {
  .v3-ai__shell {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
  }

  .v3-ai__paneltoggle {
    display: inline-flex;
    flex-shrink: 0;
  }

  .v3-ai__backdrop {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 0;
    border-radius: var(--v3-r-lg);
    background: rgba(23, 19, 13, 0.42);
    cursor: pointer;
  }

  .v3-ai__panel {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 86vw);
    flex: none;
    transform: translateX(-110%);
    transition: transform 0.22s ease;
  }
  .v3-ai__panel--open { transform: translateX(0); }

  .v3-ai__panelclose { display: inline-flex; }

  .v3-ai__chatactions {
    opacity: 1;
    pointer-events: auto;
  }

  .v3-ai__chat {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .v3-ai-msg__body { max-width: min(100%, 560px); }
  .v3-ai-msg__text { overflow-wrap: anywhere; }
}

@media (max-width: 520px) {
  .v3-ai__log { max-height: min(52vh, 520px); }
}

/* ── v3: заблокированные кнопки на новых страницах ── */
.v3-cn .v3-btn:disabled,
.v3-notes .v3-btn:disabled,
.v3-notes .v3-iconbtn:disabled,
.v3-ai .v3-btn:disabled,
.v3-ai .v3-iconbtn:disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* ════════════════════════════════════════════
   v3: настройки (settings / appearance / apps / deepseek)
   ════════════════════════════════════════════ */

.v3-set__card { padding: 18px; }

.v3-set__desc {
  margin-left: auto;
  font-size: 12px;
  line-height: 1.3;
  color: var(--v3-ink-2);
  text-align: right;
}

.v3-set__stub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  opacity: 0.7;
}

.v3-set__theme { align-self: flex-start; }

/* ── акценты ── */
.v3-set__accents {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.v3-set__accent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.v3-set__accent-swatch {
  width: 30px;
  height: 30px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 50%;
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-set__accent-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--v3-ink-2);
}

/* ── подблоки ── */
.v3-set__subblock {
  margin-top: 6px;
  padding-top: 14px;
  border-top: var(--v3-line-2) dashed color-mix(in srgb, var(--v3-ink) 28%, transparent);
}

.v3-set__subtitle {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.v3-set__hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--v3-ink-2);
}

.v3-set__err { margin: 0 0 10px; }

/* ── иконки меню ── */
.v3-set__iconlist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v3-set__iconrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card-2);
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-set__iconpair {
  display: flex;
  gap: 8px;
}

.v3-set__iconmeta {
  min-width: 0;
}

.v3-set__iconname {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-set__iconpath {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--v3-ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── пикеры иконок ── */
.v3-set__pick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.v3-set__pick-box {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 12px;
  background: var(--v3-card);
  box-shadow: 2px 2px 0 var(--v3-ink);
  overflow: hidden;
}

.v3-set__pick:hover .v3-set__pick-box { background: #fff; }

.v3-set__pick-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.v3-set__pick-preview--lg { padding: 3px; }
.v3-set__pick-preview--custom { background: #fff; }

.v3-set__pick-empty {
  color: var(--v3-ink-soft);
}
.v3-set__pick-empty--lg { color: var(--v3-ink-2); }

.v3-set__pick-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--v3-ink-2);
}

.v3-set__pick-reset {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 50%;
  background: var(--v3-red);
  color: var(--v3-ink);
  cursor: pointer;
}

/* ── папки приложений ── */
.v3-set__block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.v3-set__folders {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v3-set__folder {
  display: flex;
  align-items: center;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card);
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-set__folder-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.v3-set__folder-ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 12px;
  background: var(--v3-card-2);
  box-shadow: 2px 2px 0 var(--v3-ink);
  rotate: -2deg;
}

.v3-set__folder-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.v3-set__folder-name {
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-set__folder-meta {
  font-size: 11px;
  color: var(--v3-ink-soft);
}

.v3-set__rowactions {
  display: flex;
  gap: 6px;
  padding-right: 10px;
}

.v3-set__addrow {
  display: flex;
  gap: 10px;
}
.v3-set__addrow .v3-input { flex: 1; min-width: 0; }

.v3-set__cathead {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v3-set__cattitle {
  display: flex;
  align-items: center;
  gap: 10px;
}
.v3-set__cattitle .v3-input { flex: 1; min-width: 0; }

/* ── приложения внутри папки ── */
.v3-set__applist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v3-set__app {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-md);
  background: var(--v3-card);
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-set__apporder {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v3-set__appicons {
  display: flex;
  gap: 12px;
}

.v3-set__appfields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v3-set__underlays {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.v3-set__underlay {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.v3-set__underlay-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--v3-ink-2);
}

.v3-set__underlay-pick {
  display: flex;
  gap: 6px;
}

.v3-set__swatch {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 50%;
  background: var(--v3-card);
  cursor: pointer;
}

.v3-set__swatch--on {
  background: var(--v3-accent);
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-set__swatch-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
}

.v3-set__appmeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.v3-set__select {
  flex: 1;
  min-width: 140px;
  min-height: 38px;
  font-size: 13px;
}

/* ── deepseek ── */
.v3-set__key {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.v3-set__keyfield { margin: 0; width: 100%; }

.v3-set__keystatus { align-self: flex-start; }

/* ════════════════════════════════════════════
   v3: коллекция (хаб)
   ════════════════════════════════════════════ */

.v3-coll__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.v3-coll__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  min-width: 0;
}

.v3-coll__stat--accent { background: var(--v3-accent); }

.v3-coll__stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--v3-ink-2);
}
.v3-coll__stat--accent .v3-coll__stat-label { color: var(--v3-ink); }

.v3-coll__stat-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.v3-coll__panel { padding: 18px; }

/* ── доля по цене ── */
.v3-coll__share {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v3-coll__sharebar {
  display: flex;
  height: 22px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card-2);
  overflow: hidden;
}
.v3-coll__sharebar--empty {
  border-style: dashed;
  border-color: var(--v3-ink-soft);
}

.v3-coll__shareseg {
  display: block;
  height: 100%;
  border-right: var(--v3-line-2) solid var(--v3-ink);
}
.v3-coll__shareseg:last-child { border-right: 0; }
.v3-coll__shareseg--poke { background: #5b8def; }
.v3-coll__shareseg--mtg { background: #2f9e6b; }

.v3-coll__sharelegend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--v3-ink-2);
}
.v3-coll__sharelegend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.v3-coll__sharedot {
  width: 11px;
  height: 11px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 50%;
}
.v3-coll__sharedot--poke { background: #5b8def; }
.v3-coll__sharedot--mtg { background: #2f9e6b; }

/* ── самые ценные ── */
.v3-coll__toplist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v3-coll__toprow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card-2);
  box-shadow: 2px 2px 0 var(--v3-ink);
  color: var(--v3-ink);
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.v3-coll__toprow:hover { transform: translate(-1px, -1px); box-shadow: var(--v3-shadow-sm); }
.v3-coll__toprow:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--v3-ink); }

.v3-coll__topart {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 10px;
  background: var(--v3-card);
  overflow: hidden;
}
.v3-coll__topart img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v3-coll__topfallback {
  width: 100%;
  height: 100%;
  background: var(--v3-card-2);
}

.v3-coll__topmeta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.v3-coll__topname {
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-coll__topsub {
  font-size: 11px;
  color: var(--v3-ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-coll__topprice { flex-shrink: 0; }

/* ── открыть коллекцию ── */
.v3-coll__open {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v3-coll__sectitle {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--v3-ink-soft);
}

.v3-coll__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v3-coll__tile {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  min-width: 0;
  color: var(--v3-ink);
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.v3-coll__tile:hover { transform: translate(-1px, -1px); box-shadow: var(--v3-shadow-lg); }
.v3-coll__tile:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--v3-ink); }

.v3-coll__tile-ico {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 16px;
  background: var(--v3-card-2);
  box-shadow: 2px 2px 0 var(--v3-ink);
  rotate: -2.5deg;
  transition: rotate 0.14s ease;
}
.v3-coll__tile:hover .v3-coll__tile-ico { rotate: 2.5deg; }
.v3-coll__tile-ico img { width: 64%; height: 64%; object-fit: contain; }

.v3-coll__tile-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.v3-coll__tile-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.v3-coll__tile-desc {
  font-size: 12px;
  color: var(--v3-ink-soft);
}

.v3-coll__tile-count {
  margin-top: 4px;
}

/* ════════════════════════════════════════════
   v3: персонажи
   ════════════════════════════════════════════ */

.v3-chr {
  flex: 1;
  min-height: 0;
}

.v3-chr--boot {
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  color: var(--v3-ink-2);
}

.v3-chr__warn { margin: 0; }

.v3-chr__panel {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── каталог ── */
.v3-chr__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.v3-chr__cardwrap {
  position: relative;
}

.v3-chr__card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.v3-chr__card:hover { transform: translate(-1px, -1px); box-shadow: var(--v3-shadow-lg); }
.v3-chr__card:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--v3-ink); }

.v3-chr__avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 14px;
  box-shadow: 2px 2px 0 var(--v3-ink);
  color: rgba(23, 19, 13, 0.72);
  font-weight: 700;
  font-size: 17px;
  rotate: -2deg;
  transition: rotate 0.14s ease;
}
.v3-chr__card:hover .v3-chr__avatar { rotate: 2deg; }
.v3-chr__avatar--sm {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 14px;
}

.v3-chr__cardbody {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.v3-chr__cardname {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-chr__cardtag {
  font-size: 12px;
  color: var(--v3-ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-chr__carddel {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  opacity: 0.85;
}

/* ── верхняя панель (диалоги / настройки / создание) ── */
.v3-chr__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.v3-chr__barmeta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.v3-chr__bartitle {
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v3-chr__barmeta .v3-chr__bartitle { flex: 1; }

.v3-chr__barsub {
  font-size: 11px;
  color: var(--v3-ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-chr__boot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  color: var(--v3-ink-2);
}

.v3-chr__emptyblock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
}
.v3-chr__emptyblock .v3-empty { margin: 0; }

/* ── список диалогов ── */
.v3-chr__threads { gap: 10px; }

.v3-chr__threadlist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v3-chr__thread {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.v3-chr__threadbtn {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 9px 12px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card-2);
  box-shadow: 2px 2px 0 var(--v3-ink);
  color: var(--v3-ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.v3-chr__threadbtn:hover { background: #fff; }
.v3-chr__threadbtn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--v3-ink); }

.v3-chr__threadtitle {
  max-width: 100%;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-chr__threadpreview {
  max-width: 100%;
  font-size: 11px;
  color: var(--v3-ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-chr__hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--v3-ink-2);
}
.v3-chr__hint--tight { margin-top: 6px; }
.v3-chr__hint code {
  padding: 1px 6px;
  border: 1.5px solid var(--v3-ink);
  border-radius: 6px;
  background: var(--v3-card-2);
  font-size: 11px;
  color: var(--v3-ink);
}

/* ── формы (память / создание) ── */
.v3-chr__form { gap: 14px; }

.v3-chr__field { margin: 0; }

.v3-chr__heat {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  gap: 6px;
}

.v3-chr__heatbtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border: var(--v3-line-2) solid transparent;
  border-radius: var(--v3-r-sm);
  background: var(--v3-card-2);
  color: var(--v3-ink);
  font-family: inherit;
  cursor: pointer;
}
.v3-chr__heatbtn strong { font-size: 15px; font-weight: 700; line-height: 1.1; }
.v3-chr__heatbtn em {
  font-style: normal;
  font-size: 10px;
  color: var(--v3-ink-2);
}
.v3-chr__heatbtn--on {
  border-color: var(--v3-ink);
  background: var(--v3-accent);
  box-shadow: 2px 2px 0 var(--v3-ink);
}
.v3-chr__heatbtn--on em { color: var(--v3-ink); }

.v3-chr__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.v3-chr__chip {
  padding: 5px 12px;
  border: var(--v3-line-2) solid transparent;
  border-radius: var(--v3-r-pill);
  background: var(--v3-card-2);
  color: var(--v3-ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}
.v3-chr__chip--on {
  border-color: var(--v3-ink);
  background: var(--v3-accent);
  font-weight: 700;
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-chr__addrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.v3-chr__addinput {
  flex: 1;
  min-width: 0;
  min-height: 38px;
  font-size: 13px;
}

.v3-chr__textarea { min-height: 72px; }

.v3-chr__colorinput {
  padding: 4px;
  cursor: pointer;
}

/* ── чат ── */
.v3-chr--chat { min-height: 0; }

.v3-chr__chat {
  flex: 1;
  min-height: 0;
}

.v3-chr__log {
  flex: 1;
  min-height: 240px;
  max-height: min(58vh, 640px);
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.v3-chr__msgs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.v3-chr__msg { display: flex; }
.v3-chr__msg--me { justify-content: flex-end; }

.v3-chr__bubble {
  position: relative;
  max-width: min(92%, 560px);
  padding: 10px 14px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: 18px;
  background: var(--v3-card);
  box-shadow: 2px 2px 0 var(--v3-ink);
}
.v3-chr__msg--me .v3-chr__bubble {
  background: var(--v3-accent);
  border-bottom-right-radius: 6px;
}
.v3-chr__bubble--user {
  background: var(--v3-accent);
  border-bottom-right-radius: 6px;
}
.v3-chr__msg:not(.v3-chr__msg--me) .v3-chr__bubble {
  border-bottom-left-radius: 6px;
}

.v3-chr__bubble--pending {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--v3-ink-2);
}

.v3-chr__bubbletext {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.45;
}

.v3-chr__cost {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 7px;
  border: 1.5px solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card-2);
  font-size: 10px;
  font-weight: 700;
  color: var(--v3-ink);
}

.v3-chr__regen {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 3px 10px;
  border: 1.5px solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card-2);
  color: var(--v3-ink);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.v3-chr__regen:hover { background: var(--v3-accent); }
.v3-chr__regen:disabled { opacity: 0.5; cursor: default; pointer-events: none; }

.v3-chr__composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: auto;
}

.v3-chr__input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  max-height: 140px;
  resize: none;
}

.v3-chr__send {
  width: 48px;
  padding: 0;
  flex-shrink: 0;
  margin-bottom: 2px;
}

/* ── v3: заблокированные кнопки на новых страницах (продолжение) ── */
.v3-set .v3-btn:disabled,
.v3-set .v3-iconbtn:disabled,
.v3-coll .v3-btn:disabled,
.v3-coll .v3-iconbtn:disabled,
.v3-chr .v3-btn:disabled,
.v3-chr .v3-iconbtn:disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* ════════════════════════════════════════════
   v3-skr — стычки (боёвка / трекер)
   ════════════════════════════════════════════ */

.v3-skr {
  flex: 1;
  min-height: 0;
}

.v3-skr__boot {
  margin: 24px 0;
}

/* ── шапка: имя + счётчик очков ── */
.v3-skr__nameinput {
  width: 170px;
  min-height: 42px;
  font-size: 13px;
}

.v3-skr__pts {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: var(--v3-line) solid var(--v3-ink);
  border-radius: var(--v3-r-md);
  background: var(--v3-amber);
  box-shadow: var(--v3-shadow-sm);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  rotate: -1.5deg;
}
.v3-skr__pts em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--v3-ink-2);
}

.v3-skr__coin {
  display: inline-block;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  border: 2px solid var(--v3-ink);
  border-radius: 50%;
  background: var(--v3-lime);
}
.v3-skr__coin--sm { width: 12px; height: 12px; }

.v3-skr__alert { background: var(--v3-red); }

/* ── табы и колонки-«разворот» ── */
.v3-skr__tabs {
  align-self: flex-start;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.v3-skr__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.v3-skr__panel {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

@media (max-width: 900px) {
  .v3-skr__cols { grid-template-columns: minmax(0, 1fr); }
}

.v3-skr__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.v3-skr__subtitle {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--v3-ink-2);
}

.v3-skr__block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v3-skr__muted {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--v3-ink-soft);
}

.v3-skr__ok { align-self: flex-start; }

.v3-skr__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── герой: голова / снаряга / фигура ── */
.v3-skr__herohead {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.v3-skr__herohead h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.v3-skr__equip {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}

.v3-skr__slots {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v3-skr__slot {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 10px;
  border: var(--v3-line-2) solid transparent;
  border-radius: var(--v3-r-sm);
  background: var(--v3-card-2);
  color: var(--v3-ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.v3-skr__slot em {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--v3-ink-soft);
}
.v3-skr__slot span {
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v3-skr__slot--has {
  border-color: var(--v3-ink);
  background: var(--v3-card);
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-skr__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 96px;
  padding: 10px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-md);
  background: var(--v3-card-2);
  box-shadow: var(--v3-shadow-sm);
}
.v3-skr__figure p {
  margin: 0;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--v3-ink-2);
}
.v3-skr__figure-body {
  width: 44px;
  height: 64px;
  border: 2.5px solid var(--v3-ink);
  border-radius: 18px 18px 12px 12px;
  background: var(--hero-accent, var(--v3-accent));
  box-shadow: 3px 3px 0 var(--v3-ink);
}

/* ── лавка: плитки героев ── */
.v3-skr__subtabs { margin-bottom: 0; }

.v3-skr__tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}

.v3-skr__tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card-2);
  color: var(--v3-ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.v3-skr__tile:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--v3-ink); }
.v3-skr__tile:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--v3-ink); }
.v3-skr__tile strong { font-size: 13px; font-weight: 700; }
.v3-skr__tile span { font-size: 12px; font-weight: 700; color: var(--v3-ink-2); }
.v3-skr__tile em { font-style: normal; font-size: 10px; color: var(--v3-ink-soft); }
.v3-skr__tile--on {
  background: var(--v3-accent);
  box-shadow: 3px 3px 0 var(--v3-ink);
}

/* ── карты (StS-стиль) ── */
.v3-skr__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.v3-skr__cards--sm {
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
}

.v3-skr__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card);
  box-shadow: 3px 3px 0 var(--v3-ink);
  color: var(--v3-ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.v3-skr__card:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--v3-ink); }
.v3-skr__card:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--v3-ink); }
.v3-skr__card:disabled { cursor: default; }
.v3-skr__card--on {
  background: var(--v3-accent);
  box-shadow: 4px 4px 0 var(--v3-ink);
}
.v3-skr__card--attack { border-top: 5px solid var(--v3-red); }
.v3-skr__card--skill { border-top: 5px solid var(--v3-sky); }
.v3-skr__card--power { border-top: 5px solid var(--v3-violet); }
.v3-skr__card--gear { border-top: 5px solid var(--v3-amber); cursor: default; }

.v3-skr__cardtop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.v3-skr__cardbrand {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--v3-ink-soft);
}
.v3-skr__cardnum {
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.v3-skr__cardtitlerow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}
.v3-skr__cardname {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}
.v3-skr__cardcost {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.v3-skr__cardcost em { font-style: normal; }

.v3-skr__orb {
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 2px solid var(--v3-ink);
  border-radius: 50%;
  background: var(--v3-sky);
}

.v3-skr__cardtext { margin-top: auto; }
.v3-skr__cardtext p {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--v3-ink-2);
}
.v3-skr__cardhint { color: var(--v3-ink-soft); }
.v3-skr__cardbtn { margin-top: 6px; width: 100%; }

/* ── live-сессия ── */
.v3-skr__lobby {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.v3-skr__lobbyfield {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.v3-skr__lobbyfield .v3-input { min-height: 42px; }
.v3-skr__codeinput { width: 110px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; }

.v3-skr__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.v3-skr__rules {
  margin: 0;
  padding: 0 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.v3-skr__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.v3-skr__buybig { align-self: flex-start; }

/* ── герой: бары / статы / механика ── */
.v3-skr__inlinetabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.v3-skr__bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v3-skr__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
}
.v3-skr__bar span { width: 22px; }
.v3-skr__bar div {
  flex: 1;
  height: 14px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card-2);
  overflow: hidden;
}
.v3-skr__bar i {
  display: block;
  height: 100%;
  background: var(--v3-mint);
}
.v3-skr__bar--en i { background: var(--v3-sky); }
.v3-skr__bar em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--v3-ink-2);
}

.v3-skr__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.v3-skr__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 4px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card-2);
  box-shadow: 2px 2px 0 var(--v3-ink);
}
.v3-skr__stat em {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--v3-ink-soft);
}
.v3-skr__stat strong {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.v3-skr__mech {
  padding: 12px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card-2);
}
.v3-skr__mech h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
}
.v3-skr__mech p {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--v3-ink-2);
}
.v3-skr__mech ul {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--v3-ink-2);
}

.v3-skr__note {
  padding: 14px;
  border: var(--v3-line-2) dashed var(--v3-ink-soft);
  border-radius: var(--v3-r-sm);
}
.v3-skr__note h3 { margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.v3-skr__note p { margin: 0 0 6px; font-size: 12.5px; line-height: 1.45; color: var(--v3-ink-2); }

/* ── бой: места / юниты / рука / лог ── */
.v3-skr__seats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 520px) {
  .v3-skr__seats { grid-template-columns: minmax(0, 1fr); }
}

.v3-skr__seat {
  padding: 10px 12px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card-2);
}
.v3-skr__seat h4 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v3-skr__seatline {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--v3-ink-2);
}

.v3-skr__units {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.v3-skr__units li {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
}
.v3-skr__unitname {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v3-skr__unitname--dead { color: var(--v3-ink-soft); text-decoration: line-through; }
.v3-skr__unitbtn {
  flex-shrink: 0;
  padding: 2px 9px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card);
  color: var(--v3-ink);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.6;
  cursor: pointer;
}
.v3-skr__unitbtn:disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
.v3-skr__unitbtn:not(:disabled):hover { background: var(--v3-accent); }

.v3-skr__handcard {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v3-skr__log {
  max-height: 220px;
  overflow: auto;
  padding: 10px 12px;
  border: var(--v3-line-2) dashed var(--v3-ink-soft);
  border-radius: var(--v3-r-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.v3-skr__log p {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--v3-ink-2);
}
.v3-skr__log em {
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--v3-ink);
}

/* ════════════════════════════════════════════
   v3-mail — почта
   ════════════════════════════════════════════ */

.v3-mail {
  flex: 1;
  min-height: 0;
}

.v3-mail__error { background: var(--v3-red); }

.v3-mail__setup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 24px;
  text-align: center;
  min-height: 320px;
  justify-content: center;
}
.v3-mail__setup p { margin: 0; font-size: 14px; font-weight: 600; }

.v3-mail__hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--v3-ink-soft);
}

/* ── две колонки: список / чтение ── */
.v3-mail__cols {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.v3-mail__side,
.v3-mail__read {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: calc(100dvh - 220px);
}

.v3-mail__side { padding: 12px; gap: 10px; }
.v3-mail__read { padding: 12px; }

.v3-mail__views { display: flex; flex-direction: column; gap: 6px; }

.v3-mail__viewsrow {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.v3-mail__viewsrow::-webkit-scrollbar { display: none; }

.v3-mail__view {
  flex-shrink: 0;
  padding: 5px 10px;
  border: var(--v3-line-2) solid transparent;
  border-radius: var(--v3-r-pill);
  background: var(--v3-card-2);
  color: var(--v3-ink-2);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.v3-mail__view--on {
  border-color: var(--v3-ink);
  background: var(--v3-accent);
  color: var(--v3-ink);
  font-weight: 700;
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-mail__accs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.v3-mail__search { position: relative; }
.v3-mail__search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--v3-ink-soft);
  pointer-events: none;
}
.v3-mail__search-input {
  min-height: 40px;
  padding: 0 34px;
  font-size: 13px;
}
.v3-mail__search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--v3-r-pill);
  background: transparent;
  color: var(--v3-ink-soft);
  cursor: pointer;
}
.v3-mail__search-clear:hover { color: var(--v3-ink); }

.v3-mail__list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  -webkit-overflow-scrolling: touch;
}

.v3-mail__listempty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 12px;
  margin: 0;
}

.v3-mail__item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 9px 12px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card-2);
  color: var(--v3-ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.v3-mail__item--on {
  background: var(--v3-accent);
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-mail__itemtop {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.v3-mail__itemfrom {
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v3-mail__itemwhen {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--v3-ink-2);
}

.v3-mail__itemsubj {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v3-mail__itemsubj svg { flex-shrink: 0; }

.v3-mail__itemsnip {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--v3-ink-2);
  overflow: hidden;
  white-space: nowrap;
}
.v3-mail__itemsnip svg { flex-shrink: 0; }
.v3-mail__itemsnip span {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* непрочитанное — акцентная точка слева + жирнее */
.v3-mail__item--unread { background: var(--v3-card); }
.v3-mail__item--unread::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--v3-ink);
  border-radius: 50%;
  background: var(--v3-accent);
}
.v3-mail__item--unread .v3-mail__itemfrom,
.v3-mail__item--unread .v3-mail__itemsubj { font-weight: 700; }
.v3-mail__item--unread.v3-mail__item--on { background: var(--v3-accent); }
.v3-mail__item--unread .v3-mail__itemfrom { padding-left: 6px; }

/* ── чтение письма ── */
.v3-mail__readempty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: var(--v3-ink-soft);
  font-size: 13px;
}

.v3-mail__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: var(--v3-line-2) solid var(--v3-ink);
}

.v3-mail__back { display: none; }

.v3-mail__baractions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.v3-mail__danger { background: var(--v3-red); }

.v3-mail__readhead {
  padding: 12px 2px 10px;
  border-bottom: var(--v3-line-2) solid var(--v3-ink);
}
.v3-mail__readhead h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.v3-mail__readmeta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--v3-ink-2);
  word-break: break-word;
}
.v3-mail__readmeta b { color: var(--v3-ink); }

.v3-mail__readbody {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-top: 10px;
}

.v3-mail__iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  background: #fff;
  border-radius: var(--v3-r-sm);
}

.v3-mail__plain {
  margin: 0;
  padding: 12px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card-2);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── модалки: ящики / создание ── */
.v3-mail__acclist {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.v3-mail__acclist li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card-2);
}
.v3-mail__accbody {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.v3-mail__accbody strong { font-size: 13px; }
.v3-mail__accbody span {
  font-size: 11px;
  color: var(--v3-ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-mail__linkdanger {
  flex-shrink: 0;
  padding: 3px 10px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-red);
  color: var(--v3-ink);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.v3-mail__form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.v3-mail__form .v3-btn { align-self: flex-start; }

.v3-mail__blblock {
  margin-top: 16px;
  padding-top: 14px;
  border-top: var(--v3-line-2) dashed var(--v3-ink-soft);
}
.v3-mail__bltitle {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.v3-mail__modal--compose { max-width: 560px; }

/* селекты оставляем с родной стрелкой */
.v3-mail select.v3-input,
.v3-skr select.v3-input,
.v3-bal select.v3-input {
  appearance: auto;
  -webkit-appearance: menulist;
}

@media (max-width: 860px) {
  .v3-mail__cols { grid-template-columns: minmax(0, 1fr); }
  .v3-mail__back { display: inline-flex; }
  .v3-mail__side,
  .v3-mail__read { max-height: calc(100dvh - 260px); }
  .v3-mail:not(.v3-mail--read) .v3-mail__read { display: none; }
  .v3-mail--read .v3-mail__side { display: none; }
  .v3-mail--read .v3-mail__read { display: flex; }
}

/* ════════════════════════════════════════════
   v3-bal — временный баланс
   ════════════════════════════════════════════ */

.v3-bal {
  flex: 1;
  min-height: 0;
}

.v3-bal__hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 24px 20px;
}

.v3-bal__usd {
  margin: 0;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.v3-bal__alts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.v3-bal__alt { font-variant-numeric: tabular-nums; }

.v3-bal__hint {
  margin: 0;
  font-size: 12px;
  color: var(--v3-ink-soft);
}

.v3-bal__loading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  color: var(--v3-ink-2);
}

.v3-bal__actions {
  display: flex;
  gap: 10px;
}
.v3-bal__actions .v3-btn { flex: 1; }

@media (min-width: 640px) {
  .v3-bal__actions .v3-btn { flex: 0 0 auto; }
}

/* ── история ── */
.v3-bal__history {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v3-bal__histitle {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--v3-ink-2);
}

.v3-bal__empty { margin: 0; }

.v3-bal__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v3-bal__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card-2);
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-bal__itemmain {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.v3-bal__amt {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.v3-bal__amt--plus { color: var(--v3-ink); }
.v3-bal__amt--minus { color: var(--v3-ink-2); }

.v3-bal__comment {
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--v3-ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v3-bal__comment--muted { color: var(--v3-ink-soft); }

.v3-bal__when {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 11px;
  color: var(--v3-ink-soft);
  font-variant-numeric: tabular-nums;
}

.v3-bal__del { flex-shrink: 0; }

/* ── модалка ── */
.v3-bal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: default;
  padding: 0;
}

.v3-bal .v3-modal__card {
  position: relative;
  z-index: 1;
}

.v3-bal__amount {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.v3-bal__cur { margin-bottom: 14px; }
.v3-bal__err { margin-top: 2px; }

/* ── v3: заблокированные кнопки на новых страницах ── */
.v3-skr .v3-btn:disabled,
.v3-skr .v3-iconbtn:disabled,
.v3-mail .v3-btn:disabled,
.v3-mail .v3-iconbtn:disabled,
.v3-bal .v3-btn:disabled,
.v3-bal .v3-iconbtn:disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* ════════════════════════════════════════════
   v3-st — студия (векторный редактор, fullscreen)
   Скоуп: .v3-st на .studio-app. Холст и его
   внутренности (nodes/selection/guides) не трогаем.
   ════════════════════════════════════════════ */

/* ── тулбар: «стикер» поверх холста ── */
.v3-st .studio-toolbar {
  padding: 8px;
  border: var(--v3-line) solid var(--v3-ink);
  border-radius: var(--v3-r-lg);
  background: var(--v3-card);
  backdrop-filter: none;
  box-shadow: var(--v3-shadow);
}

.v3-st .studio-tool-group {
  border-right: var(--v3-line-2) solid var(--v3-ink);
}

.v3-st .studio-tool {
  border: var(--v3-line-2) solid transparent;
  border-radius: var(--v3-r-sm);
  color: var(--v3-ink);
  font-family: inherit;
}

.v3-st .studio-tool:hover:not(:disabled) {
  background: var(--v3-card-2);
}

.v3-st .studio-tool:disabled {
  opacity: 0.45;
}

.v3-st .studio-tool--active {
  border-color: var(--v3-ink);
  background: var(--v3-accent);
  color: var(--v3-ink);
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-st .studio-tool--danger:hover:not(:disabled) {
  border-color: var(--v3-ink);
  background: var(--v3-red);
  color: var(--v3-ink);
}

.v3-st .studio-tool--wide {
  border-color: var(--v3-ink);
  background: var(--v3-card-2);
  box-shadow: 2px 2px 0 var(--v3-ink);
  padding: 0 12px;
  width: auto;
}

.v3-st .studio-tool--wide:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--v3-ink);
}

.v3-st .studio-tool-label {
  font-size: 12px;
  font-weight: 700;
}

.v3-st .studio-zoom-label {
  color: var(--v3-ink-2);
  font-weight: 700;
}

/* ── статусбар ── */
.v3-st .studio-statusbar {
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card);
  backdrop-filter: none;
  box-shadow: 2px 2px 0 var(--v3-ink);
  color: var(--v3-ink);
}

.v3-st .studio-statusbar span {
  padding: 4px 10px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card);
  font-weight: 600;
}

.v3-st .studio-statusbar-hint {
  background: var(--v3-card-2);
  color: var(--v3-ink-2);
  font-weight: 500;
}

/* ── боковые панели → v3-card ── */
.v3-st .studio-panel {
  padding: 14px;
  border: var(--v3-line) solid var(--v3-ink);
  border-radius: var(--v3-r-md);
  background: var(--v3-card);
  backdrop-filter: none;
  box-shadow: var(--v3-shadow);
}

.v3-st .studio-panel-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  color: var(--v3-ink);
}

.v3-st .studio-panel-empty.v3-st-hint {
  padding: 10px 12px;
  border: var(--v3-line-2) dashed var(--v3-ink-soft);
  border-radius: var(--v3-r-sm);
  font-size: 12px;
  color: var(--v3-ink-soft);
}

/* ── поиск слоёв ── */
.v3-st .studio-layer-search {
  color: var(--v3-ink-soft);
  margin-bottom: 12px;
}

.v3-st .studio-layer-search .v3-input {
  min-height: 38px;
  padding-right: 34px;
  font-size: 13px;
}

.v3-st .studio-layer-search-clear {
  border-radius: var(--v3-r-sm);
  color: var(--v3-ink-soft);
}

.v3-st .studio-layer-search-clear:hover {
  background: var(--v3-card-2);
  color: var(--v3-ink);
}

/* ── список слоёв ── */
.v3-st .studio-layer-item {
  border-radius: var(--v3-r-sm);
}

.v3-st .studio-layer {
  border-radius: var(--v3-r-sm);
}

.v3-st .studio-layer:hover {
  background: var(--v3-card-2);
}

.v3-st .studio-layer--active {
  background: var(--v3-accent);
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-st .studio-layer-name {
  font-weight: 600;
}

.v3-st .studio-layer-icon-btn {
  border-radius: var(--v3-r-sm);
}

.v3-st .studio-layer-icon-btn:hover {
  background: var(--v3-card-2);
}

.v3-st .studio-layer-item--drop-before::before,
.v3-st .studio-layer-item--drop-after::after {
  background: var(--v3-ink);
}

.v3-st .studio-layer-item--drop-inside .studio-layer {
  box-shadow: inset 0 0 0 2.5px var(--v3-ink);
  background: var(--v3-accent);
}

.v3-st .studio-layer-hint {
  color: var(--v3-ink-soft);
}

/* ── свойства: поля как v3-field/v3-input ── */
.v3-st .studio-field {
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--v3-ink-2);
}

.v3-st .studio-field .v3-input {
  min-height: 40px;
  padding: 0 12px;
  box-shadow: 2px 2px 0 var(--v3-ink);
  text-transform: none;
  letter-spacing: normal;
  font-size: 13px;
  font-weight: 600;
}

.v3-st .studio-field input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--v3-ink);
}

.v3-st .studio-field input[type="color"] {
  min-height: 0;
  width: 34px;
  height: 30px;
  padding: 2px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card);
  box-shadow: 2px 2px 0 var(--v3-ink);
  cursor: pointer;
}

.v3-st .studio-field input[type="range"] {
  accent-color: var(--v3-ink);
}

.v3-st .studio-textarea {
  padding: 10px 12px;
  min-height: 64px;
  line-height: 1.4;
  text-align: left;
}

.v3-st .studio-props {
  gap: 12px;
}

/* ── ряды кнопок-иконок (выравнивание/действия) ── */
.v3-st .studio-align-row {
  flex-wrap: wrap;
  gap: 6px;
}

.v3-st .studio-align-row .studio-tool {
  width: 34px;
  height: 34px;
  border-color: var(--v3-ink);
  background: var(--v3-card);
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-st .studio-align-row .studio-tool:hover:not(:disabled) {
  background: var(--v3-accent);
}

.v3-st .studio-align-row .studio-tool--active {
  background: var(--v3-accent);
}

.v3-st .studio-align-row .studio-tool:disabled {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

/* ── свотчи палитры ── */
.v3-st .studio-swatches input[type="color"] {
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card);
  cursor: pointer;
}

.v3-st .studio-swatch {
  border: 2px solid var(--v3-ink);
  box-shadow: 2px 2px 0 var(--v3-ink);
}

.v3-st .studio-swatch:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--v3-ink);
}

.v3-st .studio-swatch--active {
  outline: 2.5px solid var(--v3-ink);
  outline-offset: 2px;
  box-shadow: var(--v3-shadow-sm);
}

/* ── кнопки действий в свойствах ── */
.v3-st .v3-btn:disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.v3-st .v3-btn--ghost {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

/* ── подсказка пустого холста ── */
.v3-st .studio-empty-hint p {
  background: var(--v3-card);
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  box-shadow: 2px 2px 0 var(--v3-ink);
  padding: 6px 14px;
  font-weight: 600;
  color: var(--v3-ink-2);
}

/* ── модалки проектов/справки (StudioHelp/StudioProjects,
       файлы не в этом скоупе — перекрашиваем только CSS) ── */
.v3-st .studio-help-overlay {
  backdrop-filter: blur(3px);
}

.v3-st .studio-help-card {
  border: var(--v3-line) solid var(--v3-ink);
  border-radius: var(--v3-r-md);
  background: var(--v3-card);
  box-shadow: var(--v3-shadow-lg);
}

.v3-st .studio-help-title {
  font-weight: 800;
}

.v3-st .studio-help-lead,
.v3-st .studio-file-hint {
  color: var(--v3-ink-2);
}

.v3-st .studio-file-warn {
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-amber);
  color: var(--v3-ink);
}

.v3-st .studio-file-current {
  border: var(--v3-line-2) dashed var(--v3-ink-soft);
  border-radius: var(--v3-r-sm);
}

.v3-st .studio-file-current-label {
  color: var(--v3-ink-soft);
  font-weight: 700;
}

.v3-st .studio-file-actions .btn {
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card);
  box-shadow: 2px 2px 0 var(--v3-ink);
  font-weight: 700;
  color: var(--v3-ink);
}

.v3-st .studio-file-actions .btn--primary {
  background: var(--v3-accent);
}

.v3-st .studio-file-actions .btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--v3-ink);
}

/* Select: нативная стрелка (на случай появления select в панелях) */
.v3-st select.v3-input {
  appearance: auto;
}

/* ════════════════════════════════════════════
   v3: покемоны
   ════════════════════════════════════════════ */

.v3-poke__top {
  display: flex;
}

.v3-poke__scan {
  flex: 0 0 auto;
}
.v3-poke__scan--on {
  background: var(--v3-accent);
}

/* ── портфель: стат-карточки ── */
.v3-poke .poke-stat-card {
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-md);
  background: var(--v3-card);
  box-shadow: 2px 2px 0 var(--v3-ink);
}
.v3-poke .poke-stat-card--accent { background: var(--v3-accent); }
.v3-poke .poke-stat-label { color: var(--v3-ink-2); font-weight: 600; }
.v3-poke .poke-stat-value { color: var(--v3-ink); font-weight: 700; }

.v3-poke .poke-section-title {
  color: var(--v3-ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ── «самые дорогие» ── */
.v3-poke .poke-top-row {
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card);
  box-shadow: 2px 2px 0 var(--v3-ink);
}
.v3-poke .poke-top-name { color: var(--v3-ink); }
.v3-poke .poke-top-sub { color: var(--v3-ink-2); }
.v3-poke .poke-top-price { color: var(--v3-ink); font-weight: 700; }

/* ── сеты ── */
.v3-poke .poke-set-row {
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-md);
  background: var(--v3-card);
  box-shadow: 2px 2px 0 var(--v3-ink);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.v3-poke .poke-set-row:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--v3-ink);
}
.v3-poke .poke-set-name { color: var(--v3-ink); font-weight: 600; }
.v3-poke .poke-set-sub,
.v3-poke .poke-set-pct { color: var(--v3-ink-2); }

.v3-poke .poke-progress {
  height: 12px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card-2);
}
.v3-poke .poke-progress-bar { background: var(--v3-accent); }

/* ── биндер ── */
.v3-poke .poke-binder-title { color: var(--v3-ink); font-weight: 700; }
.v3-poke .poke-binder-sub { color: var(--v3-ink-2); }

.v3-poke .poke-mini-btn {
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card);
  color: var(--v3-ink);
  font-family: inherit;
  font-weight: 700;
  box-shadow: 2px 2px 0 var(--v3-ink);
}
.v3-poke .poke-mini-btn--danger {
  background: var(--v3-red);
  color: var(--v3-ink);
}

/* ── пустота и ошибки ── */
.v3-poke .poke-empty {
  margin: 8px 0;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: var(--v3-line-2) dashed var(--v3-ink-soft);
  border-radius: var(--v3-r-sm);
  color: var(--v3-ink-soft);
  font-size: 13px;
}

.v3-poke .poke-err {
  margin: 0;
  padding: 10px 14px;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-red);
  box-shadow: 2px 2px 0 var(--v3-ink);
  color: var(--v3-ink);
  font-weight: 600;
}

/* ── арт карточек (не ccard-*) ── */
.v3-poke .poke-top-art,
.v3-poke .poke-picker-art,
.v3-poke .poke-detail-art,
.v3-poke .poke-tile-art {
  border-radius: var(--v3-r-sm);
  background: var(--v3-card-2);
  box-shadow: 3px 3px 0 var(--v3-ink);
}

/* ── пикер ── */
.v3-poke .poke-picker { max-width: 560px; }
.v3-poke .poke-picker-q { color: var(--v3-ink-2); }
.v3-poke .poke-picker-name { color: var(--v3-ink); }
.v3-poke .poke-picker-sub { color: var(--v3-ink-2); }
.v3-poke .poke-picker-have { color: var(--v3-ink); font-weight: 700; }

/* ── модалка детали ── */
.v3-poke .poke-detail { max-width: 520px; }
.v3-poke .poke-detail-sub { color: var(--v3-ink-2); }
.v3-poke .poke-sibling-btn {
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card);
  color: var(--v3-ink);
  box-shadow: 2px 2px 0 var(--v3-ink);
}
.v3-poke .poke-qty-n { color: var(--v3-ink); }
.v3-poke .poke-note {
  min-height: 64px;
  height: auto;
  padding: 10px 14px;
  line-height: 1.4;
}

/* старые icon-btn внутри скоупа (+/− количества, «назад к сетам») */
.v3-poke .icon-btn {
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card);
  color: var(--v3-ink);
  box-shadow: 2px 2px 0 var(--v3-ink);
}

/* кнопки действий в модалке детализации */
.v3-poke .modal-actions .btn {
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-card);
  color: var(--v3-ink);
  box-shadow: 2px 2px 0 var(--v3-ink);
  font-family: inherit;
  font-weight: 700;
}
.v3-poke .modal-actions .btn--primary { background: var(--v3-accent); }

/* ── bag: инструменты фильтрации ── */
.v3-poke .poke-bag-input,
.v3-poke .poke-set-select {
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
  background: var(--v3-card);
  box-shadow: 2px 2px 0 var(--v3-ink);
  color: var(--v3-ink);
  font-family: inherit;
}
.v3-poke .poke-chrome-go { flex: 0 0 auto; }

/* нативная стрелка у select */
.v3-poke select.v3-input {
  -webkit-appearance: auto;
  appearance: auto;
}

/* ── v3: покемоны · едут ── */
/* select в форме посылок — нативная стрелка */
.v3-cn select.v3-input {
  -webkit-appearance: auto;
  appearance: auto;
}

/* ── v3: покемоны · счётчик паков «в пути» со стрелками ── */
.poke-set-pct {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  margin-left: 10px;
}

.v3-poke__transit {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-pill);
  background: var(--v3-accent);
  box-shadow: 2px 2px 0 var(--v3-ink);
  overflow: hidden;
}

.v3-poke__transit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--v3-ink);
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.v3-poke__transit-btn:active { background: rgba(23, 19, 13, 0.14); }

.v3-poke__transit-n {
  min-width: 20px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding: 0 2px;
}

.v3-poke__transit--add {
  width: 26px;
  height: 26px;
  justify-content: center;
  opacity: 0.55;
}
.v3-poke__transit--add:hover { opacity: 1; }

/* ════════════════════════════════════════════
   v3: покемоны · лицо карты (CollectionCardFace)
   Разметка общая с MTG — красим только скоупом.
   ════════════════════════════════════════════ */

.v3-poke .ccard {
  --ccard-lime: var(--v3-accent);
  border: var(--v3-line) solid var(--v3-ink);
  border-radius: var(--v3-r-md);
  background: var(--v3-card);
  box-shadow: var(--v3-shadow-sm);
}

.v3-poke .ccard--wish {
  box-shadow: var(--v3-shadow-sm);
  outline: 2.5px solid var(--v3-amber);
  outline-offset: 3px;
}

.v3-poke .ccard-stage {
  margin: 2.6% 2.6% 0;
  border: var(--v3-line-2) solid var(--v3-ink);
  border-radius: var(--v3-r-sm);
}

.v3-poke .ccard-media {
  background: var(--v3-ink);
  border-radius: calc(var(--v3-r-sm) - 3px) calc(var(--v3-r-sm) - 3px) var(--v3-r-md)
    var(--v3-r-md);
}

.v3-poke .ccard-fallback {
  background: var(--v3-base-2);
}

.v3-poke .ccard-qty {
  border: var(--v3-line-2) solid var(--v3-ink);
  font-weight: 700;
}

.v3-poke .ccard-wish {
  border: var(--v3-line-2) solid var(--v3-ink);
  background: var(--v3-amber);
  color: var(--v3-ink);
  font-weight: 700;
}

.v3-poke .ccard-banner {
  border-top: var(--v3-line-2) solid var(--v3-ink);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.v3-poke .ccard-tag {
  border: 1.5px solid var(--v3-ink);
  background: var(--v3-card-2);
  font-weight: 600;
}

.v3-poke .ccard-foot {
  background: var(--v3-card);
}

.v3-poke .ccard-name {
  font-weight: 800;
}

.v3-poke .ccard-side {
  border-left: var(--v3-line) solid var(--v3-ink);
}

.v3-poke .ccard-price {
  font-weight: 800;
}

.v3-poke .ccard-miss {
  color: var(--v3-ink);
  background: rgba(255, 253, 246, 0.38);
  text-shadow: none;
  font-weight: 600;
}

/* ── v3: покемоны · ручная цена и своя картинка ── */
.v3-poke .poke-price-hint {
  font-size: 12px;
  color: var(--v3-ink-soft);
  margin-top: 4px;
}

.v3-poke .poke-img-input {
  display: none;
}

.v3-poke .poke-img-actions {
  display: flex;
  gap: 8px;
  margin: 6px 0;
}
