@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* =============================================================
   v4 — minimal
   One font (Inter), monochrome palette (ink/grayscale),
   hairlines only, no shadows, anim through ease-out fades.
   ============================================================= */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

.frame.v4 {
  --bg: #fafaf9;
  --ink: #0a0a0a;
  --ink-2: #525252;
  --ink-3: #a3a3a3;
  --line: #ececea;
  --line-2: #dcdcd8;
  --hover: #f4f4f2;
  --on-ink: #ffffff;
  --accent-fire: #d97706;
  --accent-bookmark: #b08800;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, "system-ui", sans-serif;
  font-feature-settings: "ss01", "cv11";
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}

.frame.v4.theme-dark {
  --bg: #0e0e0d;
  --ink: #fafaf7;
  --ink-2: #a3a39e;
  --ink-3: #525250;
  --line: #1f1f1d;
  --line-2: #2a2a28;
  --hover: #161614;
  --on-ink: #0a0a0a;
  --accent-fire: #fb923c;
  --accent-bookmark: #fbbf24;
}

@media (prefers-color-scheme: dark) {
  .frame.v4:not(.theme-light) {
    --bg: #0e0e0d;
    --ink: #fafaf7;
    --ink-2: #a3a39e;
    --ink-3: #525250;
    --line: #1f1f1d;
    --line-2: #2a2a28;
    --hover: #161614;
    --on-ink: #0a0a0a;
    --accent-fire: #fb923c;
    --accent-bookmark: #fbbf24;
  }
}

@keyframes v4-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes v4-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes v4-pop   {
  0%   { transform: scale(0.8); opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

.frame.v4 *, .frame.v4 *::before, .frame.v4 *::after { box-sizing: border-box; }
.frame.v4 a { color: inherit; text-decoration: none; }
.frame.v4 a:hover { color: var(--ink); }
.frame.v4 button { font-family: inherit; }

/* Layout */
.frame.v4 .v4-app { min-height: 100vh; display: flex; flex-direction: column; }
.frame.v4 .v4-shell { max-width: 820px; margin: 0 auto; width: 100%; padding: 0 24px; }
@media (max-width: 640px) {
  .frame.v4 .v4-shell { padding: 0 16px; }
}

/* Header */
.frame.v4 .v4-hdr {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  animation: v4-fade 0.3s var(--ease-out);
}
.frame.v4 .v4-logo {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  flex-shrink: 0;
}
.frame.v4 .v4-nav { display: flex; gap: 14px; flex: 1; flex-wrap: nowrap; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.frame.v4 .v4-nav::-webkit-scrollbar { display: none; }
.frame.v4 .v4-nav a {
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 400;
  transition: color 0.2s var(--ease);
  position: relative;
  padding: 4px 0;
  white-space: nowrap;
  flex-shrink: 0;
}
.frame.v4 .v4-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.frame.v4 .v4-nav a:hover { color: var(--ink); }
.frame.v4 .v4-nav a:hover::after { transform: scaleX(1); }
.frame.v4 .v4-nav a.is-active { color: var(--ink); font-weight: 500; }
.frame.v4 .v4-nav a.is-active::after { transform: scaleX(1); }

.frame.v4 .v4-hdr-right {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  color: var(--ink-2);
  flex-shrink: 0;
}
.frame.v4 .v4-hdr-right form { display: inline; margin: 0; }
.frame.v4 .v4-email-inline {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--ink-3);
}

@media (max-width: 640px) {
  .frame.v4 .v4-hdr { flex-wrap: wrap; gap: 16px; padding: 16px 0; }
  .frame.v4 .v4-nav { width: 100%; order: 3; gap: 16px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .frame.v4 .v4-nav::-webkit-scrollbar { display: none; }
  .frame.v4 .v4-hdr-right .v4-email-inline { display: none; }
}

/* Page heading */
.frame.v4 .v4-page-h {
  padding: 32px 0 20px;
  border-bottom: 1px solid var(--line);
}
.frame.v4 .v4-page-title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: var(--ink);
}
.frame.v4 .v4-page-sub {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0;
}
.frame.v4 .v4-page-sub a { color: var(--ink); border-bottom: 1px solid var(--line-2); }
.frame.v4 .v4-page-sub a:hover { border-color: var(--ink); }
@media (max-width: 640px) {
  .frame.v4 .v4-page-h { padding: 24px 0 16px; }
  .frame.v4 .v4-page-title { font-size: 20px; }
}

/* Filter row */
.frame.v4 .v4-filters {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.frame.v4 .v4-filters form {
  display: flex;
  gap: 24px;
  flex: 1;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
}
.frame.v4 .v4-search {
  flex: 1;
  min-width: 200px;
  border: none;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  padding: 4px 0;
}
.frame.v4 .v4-search::placeholder { color: var(--ink-3); }
.frame.v4 .v4-filter-group { display: flex; gap: 16px; font-size: 14px; flex-wrap: wrap; }
.frame.v4 .v4-filter-link {
  color: var(--ink-3);
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 14px;
}
.frame.v4 .v4-filter-link:hover { color: var(--ink); }
.frame.v4 .v4-filter-link.is-active { color: var(--ink); font-weight: 500; }
.frame.v4 .v4-filter-link .v4-count {
  color: var(--ink-3);
  margin-left: 4px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

/* Posts list */
.frame.v4 .v4-list { padding: 0; list-style: none; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.frame.v4 .v4-post {
  padding: 16px 18px;
  background: var(--hover);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin: 0;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
  animation: v4-fade-up 0.4s var(--ease-out) both;
  list-style: none;
}
.frame.v4 .v4-post:hover { border-color: var(--line-2); }
.frame.v4 .v4-post:target {
  border-color: var(--accent, #4a90e2);
  scroll-margin-top: 80px;
  animation: v4-target-flash 1.6s var(--ease-out);
}
@keyframes v4-target-flash {
  0%   { box-shadow: 0 0 0 0 rgba(74,144,226,0.45); }
  60%  { box-shadow: 0 0 0 6px rgba(74,144,226,0.10); }
  100% { box-shadow: 0 0 0 0 rgba(74,144,226,0); }
}
.frame.v4 .v4-post:nth-child(2) { animation-delay: 50ms; }
.frame.v4 .v4-post:nth-child(3) { animation-delay: 100ms; }
.frame.v4 .v4-post:nth-child(4) { animation-delay: 150ms; }
.frame.v4 .v4-post:nth-child(5) { animation-delay: 200ms; }
.frame.v4 .v4-post:nth-child(n+6) { animation-delay: 240ms; }

.frame.v4 .v4-post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--ink-2);
  flex-wrap: wrap;
}
.frame.v4 .v4-post-name { color: var(--ink); font-weight: 500; }
.frame.v4 .v4-post-handle { color: var(--ink-3); }
.frame.v4 .v4-post-time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.frame.v4 .v4-post-summary {
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 12px;
  padding: 14px 16px;
  background: var(--hover);
  border-radius: var(--r-md);
  line-height: 1.55;
}

.frame.v4 .v4-squeeze { padding: 14px 18px; }
.frame.v4 .v4-squeeze:hover { padding: 14px 18px; }
.frame.v4 .v4-squeeze-body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 8px;
  text-wrap: pretty;
}
.frame.v4 .v4-post-summary-tag {
  color: var(--ink-3);
  font-size: 12px;
  display: block;
  margin-bottom: 4px;
  letter-spacing: 0;
}
.frame.v4 .v4-post-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  word-wrap: break-word;
}
.frame.v4 .v4-post-body p {
  margin: 0 0 12px;
  white-space: pre-wrap;
}
.frame.v4 .v4-post-body p:last-child { margin-bottom: 0; }
.frame.v4 .v4-post-empty { font-size: 14px; color: var(--ink-3); margin: 0; font-style: italic; }
.frame.v4 .v4-post-expand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
  margin-top: 10px;
}
.frame.v4 .v4-post-expand:hover {
  color: var(--ink);
  border-color: var(--ink-2);
  background: var(--hover);
}
.frame.v4 .v4-post-expand::before {
  content: "▾";
  font-size: 11px;
  color: var(--ink-3);
  transition: transform 0.2s var(--ease);
}
.frame.v4 .v4-post-expand[hx-get*="/preview"]::before {
  content: "▴";
}
.frame.v4 .v4-post-expand:hover::before { color: var(--ink-2); }

@media (max-width: 640px) {
  .frame.v4 .v4-list { gap: 10px; }
  .frame.v4 .v4-post { padding: 12px 14px; }
  .frame.v4 .v4-post-body { font-size: 14.5px; }
}

/* Media */
.frame.v4 .v4-media {
  display: block;
  margin-top: 16px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.4s var(--ease-out);
}
.frame.v4 .v4-post:hover .v4-media { transform: translateY(-1px); }
.frame.v4 .v4-media img {
  display: block;
  max-width: 100%;
  max-height: 360px;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: var(--bg);
}

.frame.v4 .v4-gallery {
  margin-top: 16px;
  display: grid;
  gap: 4px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
}
.frame.v4 .v4-gallery--2 { grid-template-columns: 1fr 1fr; }
.frame.v4 .v4-gallery--3 { grid-template-columns: 1fr 1fr 1fr; }
.frame.v4 .v4-gallery--many {
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 200px;
}
.frame.v4 .v4-gallery--3 { grid-auto-rows: 200px; }
.frame.v4 .v4-gallery--2 { grid-auto-rows: 240px; }
.frame.v4 .v4-gallery-item {
  display: block;
  overflow: hidden;
  background: var(--hover);
}
.frame.v4 .v4-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out);
}
.frame.v4 .v4-gallery-item:hover img { transform: scale(1.02); }
@media (max-width: 640px) {
  .frame.v4 .v4-gallery--many { grid-auto-rows: 140px; }
  .frame.v4 .v4-gallery--3 { grid-auto-rows: 140px; }
  .frame.v4 .v4-gallery--2 { grid-auto-rows: 160px; }
}
.frame.v4 .v4-media-stub {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  color: inherit;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.frame.v4 .v4-media-stub:hover {
  background: var(--hover);
  border-color: var(--line-2);
  transform: translateX(2px);
}
.frame.v4 .v4-media-stub-glyph {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: var(--hover);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ink-2);
  font-size: 13px;
}
.frame.v4 .v4-media-stub-text { flex: 1; min-width: 0; }
.frame.v4 .v4-media-stub-title { font-size: 14px; color: var(--ink); }
.frame.v4 .v4-media-stub-sub { font-size: 13px; color: var(--ink-2); }
.frame.v4 .v4-media-stub-arrow {
  color: var(--ink-3);
  font-size: 14px;
  transition: transform 0.25s var(--ease-out);
}
.frame.v4 .v4-media-stub:hover .v4-media-stub-arrow { transform: translateX(4px); }

/* Lightbox (image preview popup) */
.v4-lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 95vw;
  max-height: 95vh;
  width: auto;
  height: auto;
  overflow: visible;
}
.v4-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.v4-lightbox[open] {
  animation: v4-lightbox-in 0.2s ease-out;
}
@keyframes v4-lightbox-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.v4-lightbox-img {
  display: block;
  max-width: 95vw;
  max-height: 95vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  user-select: none;
}
.v4-lightbox-close {
  position: fixed;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.v4-lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
.v4-lightbox-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.frame.v4 .v4-img-trigger { cursor: zoom-in; }

/* Actions */
.frame.v4 .v4-actions {
  display: flex;
  gap: 4px;
  margin-top: 12px;
  font-size: 13px;
  flex-wrap: wrap;
}
.frame.v4 .v4-actions form { display: inline; margin: 0; }
.frame.v4 .v4-action {
  background: transparent;
  border: none;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--ink-2);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.frame.v4 .v4-action:hover { color: var(--ink); background: var(--hover); }
.frame.v4 .v4-action.is-on { color: var(--ink); font-weight: 500; }
.frame.v4 .v4-action.is-on .v4-action-glyph { animation: v4-pop 0.4s var(--ease-out); }
.frame.v4 .v4-action-glyph {
  display: inline-block;
  width: 14px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: transform 0.2s var(--ease-out);
}
.frame.v4 .v4-action:hover .v4-action-glyph { transform: scale(1.15); }
.frame.v4 .v4-action-num { font-variant-numeric: tabular-nums; }

/* Channels */
.frame.v4 .v4-section { padding: 24px 0 20px; border-bottom: 1px solid var(--line); }
.frame.v4 .v4-section:last-child { border-bottom: none; padding-bottom: 0; }
.frame.v4 .v4-section-h {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin: 0 0 4px;
}
.frame.v4 .v4-section-sub {
  font-size: 13px;
  color: var(--ink-2);
  margin: 0 0 12px;
}
.frame.v4 .v4-section-count {
  color: var(--ink-3);
  font-weight: 400;
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.frame.v4 .v4-ch {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  margin: 0;
  border-radius: 0;
  transition: background 0.2s var(--ease);
  animation: v4-fade-up 0.3s var(--ease-out) both;
  list-style: none;
}
.frame.v4 .v4-ch + .v4-ch { border-top: 1px solid var(--line); }
.frame.v4 .v4-ch:hover { background: var(--hover); padding-left: 10px; padding-right: 10px; margin: 0 -10px; border-radius: var(--r-sm); border-top-color: transparent; }
.frame.v4 .v4-ch:hover + .v4-ch { border-top-color: transparent; }
.frame.v4 .v4-ch-info { min-width: 0; }
.frame.v4 .v4-ch-name {
  font-size: 14px;
  color: var(--ink);
  margin: 0;
  font-weight: 500;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.frame.v4 .v4-ch-handle { color: var(--ink-3); font-weight: 400; font-size: 13px; }
.frame.v4 .v4-ch-meta { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.frame.v4 .v4-ch-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--ink-2);
  flex-wrap: wrap;
}
.frame.v4 .v4-ch-actions form { display: inline; margin: 0; }
@media (max-width: 640px) {
  .frame.v4 .v4-ch { grid-template-columns: 1fr; }
  .frame.v4 .v4-ch-actions { padding-top: 4px; }
}

/* Tag (badges) */
.frame.v4 .v4-tag {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Channel tag chips (на /channels) */
.frame.v4 .v4-ch-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.frame.v4 .v4-tag-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  padding: 2px 8px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--bg);
  white-space: nowrap;
}

/* Filter chips (на /digest, /squeeze, /hot, /saved) */
.frame.v4 .v4-tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
  padding: 4px 0;
}
.frame.v4 .v4-tag-filter-chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-2);
  background: transparent;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.frame.v4 .v4-tag-filter-chip:hover {
  color: var(--ink);
  border-color: var(--ink-2);
  background: var(--hover);
}
.frame.v4 .v4-tag-filter-chip.is-active {
  color: var(--ink);
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  font-weight: 500;
}

/* Add form (channels) */
.frame.v4 .v4-add {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px 0;
  align-items: center;
  margin: 0;
}
.frame.v4 .v4-add + .v4-add { border-top: 1px solid var(--line); }
.frame.v4 .v4-add-input {
  border: 1px solid transparent;
  background: var(--hover);
  border-radius: var(--r-md);
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
  width: 100%;
}
.frame.v4 .v4-add-input:focus {
  border-color: var(--ink);
  background: var(--bg);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ink) 8%, transparent);
}
.frame.v4 .v4-add-input::placeholder { color: var(--ink-3); }

/* Buttons */
.frame.v4 .v4-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: var(--ink);
  color: var(--on-ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
  letter-spacing: -0.005em;
  text-decoration: none;
}
.frame.v4 .v4-btn:hover { transform: translateY(-1px); color: var(--on-ink); }
.frame.v4 .v4-btn:active { transform: translateY(0); }
.frame.v4 .v4-btn.is-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.frame.v4 .v4-btn.is-secondary:hover { border-color: var(--ink); background: var(--hover); }
.frame.v4 .v4-btn.is-text {
  background: transparent;
  border: none;
  color: var(--ink-2);
  height: auto;
  padding: 4px 8px;
  font-weight: 400;
  border-radius: var(--r-sm);
}
.frame.v4 .v4-btn.is-text:hover { color: var(--ink); background: var(--hover); transform: none; }
.frame.v4 .v4-btn.is-sm { height: 30px; padding: 0 14px; font-size: 12px; }

/* Inline link */
.frame.v4 .v4-link {
  color: var(--ink);
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font: inherit;
  padding: 0;
}
.frame.v4 .v4-link:hover { border-bottom-color: var(--ink); }

/* Auth */
.frame.v4 .v4-auth {
  max-width: 360px;
  margin: 56px auto 64px;
  padding: 0 24px;
}
@media (max-width: 640px) {
  .frame.v4 .v4-auth { margin: 32px auto 48px; padding: 0 16px; }
}
.frame.v4 .v4-auth-h {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.frame.v4 .v4-auth-sub { font-size: 14px; color: var(--ink-2); margin: 0 0 32px; }
.frame.v4 .v4-field { margin-bottom: 20px; }
.frame.v4 .v4-field-label {
  display: block;
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.frame.v4 .v4-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--hover);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  outline: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.frame.v4 .v4-input:focus {
  border-color: var(--ink);
  background: var(--bg);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ink) 8%, transparent);
}
.frame.v4 .v4-input::placeholder { color: var(--ink-3); }
.frame.v4 .v4-field-help { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.frame.v4 .v4-auth-foot { margin-top: 24px; font-size: 13px; color: var(--ink-2); }

/* Flash */
.frame.v4 .v4-flash {
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 13px;
  background: var(--hover);
  border-radius: var(--r-md);
  color: var(--ink);
  animation: v4-fade-up 0.4s var(--ease-out);
}
.frame.v4 .v4-flash.error { color: var(--ink); border: 1px solid var(--line-2); }

/* Empty state */
.frame.v4 .v4-empty {
  padding: 40px 0 32px;
  text-align: center;
  animation: v4-fade-up 0.4s var(--ease-out);
}
.frame.v4 .v4-empty-h { font-size: 15px; font-weight: 500; color: var(--ink); margin: 0 0 6px; }
.frame.v4 .v4-empty-text {
  font-size: 13.5px;
  color: var(--ink-2);
  margin: 0 auto 16px;
  max-width: 320px;
}

/* Inline empty (для секций на /channels) — без огромного блока */
.frame.v4 .v4-section-empty {
  font-size: 13px;
  color: var(--ink-3);
  padding: 8px 0 4px;
  margin: 0;
  font-style: italic;
}

/* Landing */
.frame.v4 .v4-landing {
  padding: 64px 0 48px;
  animation: v4-fade-up 0.5s var(--ease-out);
}
.frame.v4 .v4-landing-h {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 16px;
  max-width: 520px;
}
.frame.v4 .v4-landing-h em { font-style: normal; color: var(--ink-2); }
.frame.v4 .v4-landing-sub {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0 0 24px;
  max-width: 480px;
}
.frame.v4 .v4-landing-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.frame.v4 .v4-landing-cta .v4-btn { animation: v4-fade-up 0.5s var(--ease-out) both; }
.frame.v4 .v4-landing-cta .v4-btn:nth-child(2) { animation-delay: 60ms; }
.frame.v4 .v4-landing-foot {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
}
@media (max-width: 640px) {
  .frame.v4 .v4-landing { padding: 32px 0 32px; }
  .frame.v4 .v4-landing-h { font-size: 26px; margin-bottom: 12px; }
}

/* Footer */
.frame.v4 .v4-foot {
  margin-top: auto;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
}

/* Reaction-button accent overlays (subtle warm tint when active) */
.frame.v4 .v4-action.v4-action-fire.is-on { color: var(--accent-fire); }
.frame.v4 .v4-action.v4-action-bookmark.is-on { color: var(--accent-bookmark); }
