:root {
  color-scheme: light;
  --ya-bg: #f7f7f5;
  --ya-surface: #ffffff;
  --ya-surface-2: #f1f1ee;
  --ya-surface-3: #e9e9e5;
  --ya-text: #20201f;
  --ya-muted: #71716c;
  --ya-border: #e1e1dc;
  --ya-border-strong: #c9c9c2;
  --ya-accent: #f2bf49;
  --ya-accent-strong: #d89c13;
  --ya-accent-soft: #fff3cb;
  --ya-accent-ink: #2b2412;
  --ya-danger: #c83f3f;
  --ya-shadow: 0 10px 34px rgba(24,24,20,.08);
  --ya-sidebar: 252px;
  --ya-feed: 680px;
  --ya-rail: 320px;
  --ya-radius: 18px;
  --ya-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ya-bg: #171717;
  --ya-surface: #202020;
  --ya-surface-2: #2a2a2a;
  --ya-surface-3: #343434;
  --ya-text: #eeeeea;
  --ya-muted: #aaa9a4;
  --ya-border: #383836;
  --ya-border-strong: #50504c;
  --ya-accent: #f5c955;
  --ya-accent-strong: #ffd978;
  --ya-accent-soft: rgba(245,201,85,.14);
  --ya-accent-ink: #211b0d;
  --ya-danger: #ff7777;
  --ya-shadow: 0 16px 44px rgba(0,0,0,.28);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    color-scheme: dark;
    --ya-bg: #171717;
    --ya-surface: #202020;
    --ya-surface-2: #2a2a2a;
    --ya-surface-3: #343434;
    --ya-text: #eeeeea;
    --ya-muted: #aaa9a4;
    --ya-border: #383836;
    --ya-border-strong: #50504c;
    --ya-accent: #f5c955;
    --ya-accent-strong: #ffd978;
    --ya-accent-soft: rgba(245,201,85,.14);
    --ya-accent-ink: #211b0d;
    --ya-danger: #ff7777;
    --ya-shadow: 0 16px 44px rgba(0,0,0,.28);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ya-bg);
  color: var(--ya-text);
  font-family: var(--ya-font);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
}
body, button, input, textarea, select { font-family: var(--ya-font); }
a { color: inherit; text-decoration: none; }
img, video, iframe { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
input, textarea, select { min-width: 0; max-width: 100%; }
h1, h2, h3, h4, p { overflow-wrap: normal; word-break: normal; }
svg { display: block; }

.ya-icon { width: 21px; height: 21px; flex: 0 0 auto; }
.ya-skip { position: fixed; z-index: 1000; top: 10px; left: 10px; padding: 10px 14px; border-radius: 10px; background: var(--ya-text); color: var(--ya-surface); transform: translateY(-160%); }
.ya-skip:focus { transform: translateY(0); }

.ya-app { min-height: 100vh; }
.ya-stage { min-height: 100vh; margin-left: var(--ya-sidebar); }
.ya-mobile-topbar, .ya-mobile-nav { display: none; }

.ya-sidebar {
  position: fixed;
  z-index: 120;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--ya-sidebar);
  flex-direction: column;
  padding: 22px 14px 18px;
  border-right: 1px solid var(--ya-border);
  background: var(--ya-bg);
  overflow-y: auto;
}
.ya-sidebar-head { display: flex; min-height: 62px; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 0 12px 14px; }
.ya-brand { display: grid; min-width: 0; line-height: 1.12; }
.ya-brand strong { font-size: 21px; font-weight: 760; letter-spacing: -.035em; white-space: nowrap; }
.ya-brand small { margin-top: 7px; color: var(--ya-muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ya-drawer-close { display: none !important; }
.ya-nav { display: grid; gap: 4px; }
.ya-nav a {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 13px;
  padding: 10px 12px;
  border-radius: 13px;
  color: var(--ya-muted);
  font-size: 14px;
  font-weight: 610;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.ya-nav a:hover { background: var(--ya-surface-2); color: var(--ya-text); transform: translateX(1px); }
.ya-nav a.is-active { background: var(--ya-accent-soft); color: var(--ya-text); }
.ya-nav a.is-active .ya-icon { color: var(--ya-accent-strong); }
.ya-sidebar-compose {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 16px 4px 0;
  padding: 11px 16px;
  border-radius: 14px;
  background: var(--ya-accent);
  color: var(--ya-accent-ink);
  font-weight: 760;
  box-shadow: 0 8px 18px rgba(216,156,19,.16);
}
.ya-sidebar-compose:hover { background: var(--ya-accent-strong); }
.ya-sidebar-bottom { display: grid; gap: 7px; margin-top: auto; padding-top: 18px; }
.ya-sidebar-theme, .ya-sidebar-user {
  display: grid;
  min-width: 0;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 8px 10px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  text-align: left;
}
.ya-sidebar-theme { grid-template-columns: 22px minmax(0,1fr); color: var(--ya-muted); }
.ya-sidebar-theme:hover, .ya-sidebar-user:hover { background: var(--ya-surface-2); }
.ya-sidebar-user { grid-template-columns: 42px minmax(0,1fr); }
.ya-sidebar-user .avatar { width: 42px; height: 42px; border-radius: 50%; }
.ya-sidebar-user span { display: grid; min-width: 0; line-height: 1.25; }
.ya-sidebar-user strong, .ya-sidebar-user small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ya-sidebar-user strong { font-size: 13px; }
.ya-sidebar-user small { margin-top: 2px; color: var(--ya-muted); font-size: 11px; }
.ya-theme-moon { display: none; }
html[data-theme="dark"] .ya-theme-sun { display: none; }
html[data-theme="dark"] .ya-theme-moon { display: block; }
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .ya-theme-sun { display: none; }
  html[data-theme="auto"] .ya-theme-moon { display: block; }
}

.ya-icon-button, .ya-user-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
}
.ya-icon-button:hover, .ya-user-button:hover { background: var(--ya-surface-2); }
.ya-user-button .avatar { width: 34px; height: 34px; border-radius: 50%; }

.ya-main {
  display: grid;
  grid-template-columns: minmax(0,var(--ya-feed)) minmax(280px,var(--ya-rail));
  gap: 28px;
  width: min(100%, calc(var(--ya-feed) + var(--ya-rail) + 28px));
  min-width: 0;
  margin: 0 auto;
  padding: 0 24px 72px;
}
.ya-main-wide { grid-template-columns: minmax(0,920px); width: min(100%,968px); }
.ya-content {
  min-width: 0;
  min-height: 100vh;
  border-inline: 1px solid var(--ya-border);
  background: var(--ya-surface);
}
.ya-main-wide .ya-content { border: 0; background: transparent; padding-top: 28px; }
.ya-right-rail {
  position: sticky;
  top: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  max-height: 100vh;
  padding: 18px 0 40px;
  overflow-y: auto;
  scrollbar-width: none;
}
.ya-right-rail::-webkit-scrollbar { display: none; }
.ya-rail-search { position: sticky; top: 0; z-index: 4; padding: 2px 0 4px; background: var(--ya-bg); }
.ya-search {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr) 36px;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 6px 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--ya-surface-2);
}
.ya-search:focus-within { border-color: var(--ya-accent-strong); background: var(--ya-surface); box-shadow: 0 0 0 3px var(--ya-accent-soft); }
.ya-search-icon { color: var(--ya-muted); }
.ya-search input { width: 100%; border: 0; outline: 0; background: transparent; }
.ya-search input::placeholder { color: var(--ya-muted); }
.ya-search button { display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 50%; background: transparent; }
.ya-search button:hover { background: var(--ya-surface-3); }
.ya-rail-card { padding: 16px; border-radius: 18px; background: var(--ya-surface-2); }
.ya-rail-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ya-rail-title h2 { margin: 2px 0 0; font-size: 18px; letter-spacing: -.025em; }
.ya-rail-title > a { color: var(--ya-accent-strong); font-size: 12px; font-weight: 700; }
.ya-eyebrow { color: var(--ya-muted); font-size: 10px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.ya-topic-list { counter-reset: topic; display: grid; gap: 2px; margin: 12px -8px -4px; padding: 0; list-style: none; }
.ya-topic-list li { counter-increment: topic; }
.ya-topic-list li a { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 8px; padding: 9px 8px; border-radius: 12px; }
.ya-topic-list li a::before { content: counter(topic); color: var(--ya-muted); font-size: 12px; font-weight: 760; }
.ya-topic-list li a:hover { background: var(--ya-surface-3); }
.ya-topic-list span { display: grid; min-width: 0; }
.ya-topic-list small, .ya-topic-list em { color: var(--ya-muted); font-size: 10px; font-style: normal; }
.ya-topic-list strong { margin: 1px 0; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.ya-suggested-users { display: grid; gap: 2px; margin: 10px -8px -5px; }
.ya-suggested-users a { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.ya-suggested-users a:hover { background: var(--ya-surface-3); }
.ya-suggested-users .avatar { width: 42px; height: 42px; border-radius: 50%; }
.ya-suggested-users span { display: grid; min-width: 0; line-height: 1.25; }
.ya-suggested-users strong, .ya-suggested-users small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ya-suggested-users strong { font-size: 13px; }
.ya-suggested-users small { color: var(--ya-muted); font-size: 10px; }
.ya-suggested-users b { padding: 6px 10px; border: 1px solid var(--ya-border); border-radius: 999px; background: var(--ya-surface); font-size: 10px; }
.ya-rail-note { padding: 0 4px; color: var(--ya-muted); font-size: 11px; }
.ya-rail-note p { margin: 0 0 8px; }
.ya-rail-note nav { display: flex; flex-wrap: wrap; gap: 10px; }

.ya-social-heading, .ya-safe-heading, .ya-page-heading {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: end;
  gap: 14px;
  margin: 0 !important;
  padding: 15px 18px 13px !important;
  border-bottom: 1px solid var(--ya-border) !important;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
}
html[data-theme="dark"] .ya-social-heading,
html[data-theme="dark"] .ya-safe-heading,
html[data-theme="dark"] .ya-page-heading { background: rgba(32,32,32,.92); }
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .ya-social-heading,
  html[data-theme="auto"] .ya-safe-heading,
  html[data-theme="auto"] .ya-page-heading { background: rgba(32,32,32,.92); }
}
.ya-social-heading .ya-eyebrow, .ya-safe-heading .ya-eyebrow, .ya-page-heading .ya-eyebrow { display: none; }
.ya-social-heading h1, .ya-safe-heading h1, .ya-page-heading h1 { margin: 0 !important; font-size: 22px !important; line-height: 1.15 !important; letter-spacing: -.03em !important; }
.ya-social-heading p, .ya-safe-heading p, .ya-page-heading p, .ya-lead { margin: 5px 0 0 !important; color: var(--ya-muted) !important; font-size: 12px !important; line-height: 1.45 !important; }
.ya-feed-tabs { display: flex; align-items: center; gap: 4px; }
.ya-feed-tabs a { position: relative; padding: 7px 10px; border-radius: 999px; color: var(--ya-muted); font-size: 12px; font-weight: 650; }
.ya-feed-tabs a:hover { background: var(--ya-surface-2); color: var(--ya-text); }
.ya-feed-tabs a.is-active { background: var(--ya-accent-soft); color: var(--ya-text); }
.ya-filter-pills { display: flex; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--ya-border); overflow-x: auto; scrollbar-width: none; }
.ya-filter-pills::-webkit-scrollbar { display: none; }
.ya-filter-pills span { flex: 0 0 auto; padding: 7px 11px; border: 1px solid var(--ya-border); border-radius: 999px; color: var(--ya-muted); font-size: 11px; font-weight: 650; }
.ya-filter-pills span.is-active { border-color: var(--ya-accent); background: var(--ya-accent-soft); color: var(--ya-text); }

.ya-primary-button, .ya-secondary-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.2;
}
.ya-primary-button { background: var(--ya-accent); color: var(--ya-accent-ink); }
.ya-primary-button:hover { background: var(--ya-accent-strong); }
.ya-secondary-button { border-color: var(--ya-border); background: var(--ya-surface); color: var(--ya-text); }
.ya-secondary-button:hover { border-color: var(--ya-border-strong); background: var(--ya-surface-2); }

.ya-notice { margin: 12px 16px; padding: 10px 12px; border-radius: 11px; font-size: 12px; }
.ya-notice.is-success { background: var(--ya-accent-soft); color: var(--ya-text); }
.ya-notice.is-error { background: rgba(200,63,63,.12); color: var(--ya-danger); }
.ya-composer {
  display: grid;
  grid-template-columns: 46px minmax(0,1fr);
  gap: 11px;
  padding: 14px 16px 13px;
  border-bottom: 1px solid var(--ya-border);
  background: var(--ya-surface);
}
.ya-composer > .avatar { width: 46px; height: 46px; border-radius: 50%; }
.ya-composer form { min-width: 0; }
.ya-composer textarea { width: 100%; min-height: 60px; padding: 7px 0; border: 0; outline: 0; background: transparent; resize: none; font-size: 16px; line-height: 1.5; }
.ya-composer textarea::placeholder { color: var(--ya-muted); }
.ya-composer-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 9px; border-top: 1px solid var(--ya-border); }
.ya-composer-links { display: flex; align-items: center; gap: 10px; color: var(--ya-muted); font-size: 11px; }
.ya-composer-links a { color: var(--ya-accent-strong); font-weight: 700; }
.ya-composer .ya-primary-button { min-height: 34px; padding: 7px 13px; border-radius: 999px; }
.ya-composer-guest { grid-template-columns: minmax(0,1fr) auto; align-items: center; }
.ya-composer-guest p { margin: 4px 0 0; color: var(--ya-muted); font-size: 12px; }

.ya-feed-list { display: block; min-width: 0; }
.ya-post-card { margin: 0; border: 0; border-bottom: 1px solid var(--ya-border); border-radius: 0; background: var(--ya-surface); transition: background .15s ease; }
.ya-post-card:hover { background: color-mix(in srgb, var(--ya-surface) 94%, var(--ya-accent-soft)); }
.ya-post-head { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 16px 0; }
.ya-author { display: inline-flex; min-width: 0; align-items: center; gap: 10px; }
.ya-author .avatar { width: 44px; height: 44px; border-radius: 50%; }
.ya-author > span { display: grid; min-width: 0; line-height: 1.25; }
.ya-author strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.ya-author small { margin-top: 3px; overflow: hidden; color: var(--ya-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ya-post-meta-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 5px; }
.ya-chip { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border-radius: 999px; background: var(--ya-surface-2); color: var(--ya-muted); font-size: 9px; font-weight: 760; letter-spacing: .04em; text-transform: uppercase; }
.ya-more-button { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; color: var(--ya-muted); font-weight: 800; }
.ya-more-button:hover { background: var(--ya-surface-2); color: var(--ya-text); }
.ya-post-body { min-width: 0; padding: 10px 16px 12px 70px; }
.ya-community-context { display: inline-flex; margin-bottom: 7px; color: var(--ya-accent-strong); font-size: 10px; font-weight: 760; }
.ya-post-body h2 { margin: 0 0 7px; font-size: 18px; line-height: 1.3; letter-spacing: -.018em; }
.ya-post-copy { color: var(--ya-text); font-size: 14px; line-height: 1.62; }
.ya-post-copy p { margin: 0 0 9px; }
.ya-post-copy p:last-child { margin-bottom: 0; }
.ya-post-media { display: block; margin-top: 12px; overflow: hidden; border: 1px solid var(--ya-border); border-radius: 15px; background: var(--ya-surface-2); }
.ya-post-media img { display: block; width: 100%; max-height: 620px; object-fit: cover; }
.ya-post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ya-post-tags a { color: var(--ya-accent-strong); font-size: 11px; font-weight: 650; }
.ya-post-actions { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); padding: 0 10px 8px 60px; }
.ya-post-actions a, .ya-post-actions button { display: inline-flex; min-width: 0; min-height: 38px; align-items: center; justify-content: center; gap: 6px; padding: 6px 7px; border: 0; border-radius: 9px; background: transparent; color: var(--ya-muted); font-size: 10px; }
.ya-post-actions a:hover, .ya-post-actions button:hover { background: var(--ya-surface-2); color: var(--ya-text); }
.ya-post-actions .ya-icon { width: 18px; height: 18px; }
.ya-post-actions .is-active { color: var(--ya-accent-strong); background: var(--ya-accent-soft); }
.ya-post-actions .ya-like-button.is-active .ya-icon { fill: currentColor; }
.ya-post-actions b { font-weight: 760; }

.ya-safe-list { display: grid; gap: 12px; padding: 16px; }
.ya-safe-card { min-width: 0; overflow: hidden; border: 1px solid var(--ya-border); border-radius: 15px; background: var(--ya-surface); }
.ya-safe-card .ya-card-media { display: block; overflow: hidden; background: var(--ya-surface-2); }
.ya-safe-card .ya-card-media img { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; transition: transform .25s ease; }
.ya-safe-card:hover .ya-card-media img { transform: scale(1.015); }
.ya-card-copy { min-width: 0; padding: 13px; }
.ya-card-copy h2 { margin: 4px 0 6px; font-size: 15px; line-height: 1.35; }
.ya-card-copy p { margin: 0; color: var(--ya-muted); font-size: 11px; line-height: 1.5; }
.ya-card-link { display: inline-flex; margin-top: 11px; color: var(--ya-accent-strong); font-size: 11px; font-weight: 760; }
.ya-library-grid, .ya-market-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.ya-safe-empty, .ya-empty-state { margin: 16px; padding: 34px 20px; border: 1px dashed var(--ya-border-strong); border-radius: 16px; color: var(--ya-muted); text-align: center; }
.ya-empty-state h1, .ya-empty-state h2 { color: var(--ya-text); }

.ya-term-grid { display: grid; gap: 10px; padding: 16px; }
.ya-term-card { display: grid; grid-template-columns: 42px minmax(0,1fr) 20px; align-items: center; gap: 12px; min-width: 0; padding: 14px; border: 1px solid var(--ya-border); border-radius: 14px; background: var(--ya-surface); }
.ya-term-card:hover { border-color: var(--ya-border-strong); background: var(--ya-surface-2); }
.ya-term-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: var(--ya-accent-soft); color: var(--ya-accent-strong); font-size: 18px; font-weight: 800; }
.ya-term-card div { min-width: 0; }
.ya-term-card h2 { margin: 0 0 4px; font-size: 15px; }
.ya-term-card p { margin: 0 0 6px; color: var(--ya-muted); font-size: 11px; line-height: 1.45; }
.ya-term-card small { color: var(--ya-accent-strong); font-size: 10px; font-weight: 760; }
.ya-term-arrow { color: var(--ya-muted); }

.ya-article, .ya-book-detail, .ya-market-detail, .ya-profile-card, .ya-comments, .ya-section, .ya-studio-placeholder {
  border: 1px solid var(--ya-border);
  border-radius: 18px;
  background: var(--ya-surface);
}
.ya-article { padding: clamp(20px,4vw,38px); }
.ya-article-head { margin-bottom: 22px; }
.ya-article-head h1 { margin: 6px 0 14px; font-size: clamp(28px,4.5vw,46px); line-height: 1.08; letter-spacing: -.045em; }
.ya-featured { margin: 0 0 24px; }
.ya-featured img { display: block; width: 100%; border-radius: 14px; }
.ya-prose { min-width: 0; font-size: 15px; line-height: 1.75; }
.ya-prose > :first-child { margin-top: 0; }
.ya-prose > :last-child { margin-bottom: 0; }
.ya-prose h2 { margin: 1.6em 0 .6em; font-size: 24px; }
.ya-prose h3 { margin: 1.5em 0 .5em; font-size: 19px; }
.ya-prose a { color: var(--ya-accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.ya-prose pre, .ya-prose table { max-width: 100%; overflow: auto; }

.ya-book-detail, .ya-market-detail { display: grid; grid-template-columns: minmax(210px,300px) minmax(0,1fr); gap: clamp(24px,4vw,44px); padding: clamp(20px,4vw,38px); }
.ya-book-cover, .ya-market-image, .ya-book-info, .ya-market-info { min-width: 0; }
.ya-book-cover img, .ya-market-image img { display: block; width: 100%; max-height: 600px; border-radius: 14px; object-fit: cover; box-shadow: var(--ya-shadow); }
.ya-cover-placeholder { display: grid; min-height: 410px; place-items: center; border-radius: 14px; background: var(--ya-surface-2); color: var(--ya-muted); font-size: 22px; font-weight: 760; }
.ya-book-info h1, .ya-market-info h1 { margin: 7px 0 12px; font-size: clamp(28px,4vw,44px); line-height: 1.08; letter-spacing: -.04em; }
.ya-book-actions, .ya-marathon-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 20px 0; }
.ya-section { margin-top: 18px; padding: 20px; }
.ya-section-head h2 { margin: 0 0 14px; font-size: 18px; }
.ya-seller { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 22px 0 14px; padding-top: 17px; border-top: 1px solid var(--ya-border); }
.ya-seller > div { display: flex; min-width: 0; align-items: center; gap: 10px; }
.ya-seller span { display: grid; }
.ya-seller small { color: var(--ya-muted); }
.ya-market-panels { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.ya-market-panels section { display: grid; min-width: 0; gap: 9px; padding: 14px; border: 1px solid var(--ya-border); border-radius: 13px; background: var(--ya-bg); }
.ya-market-panels h2 { margin: 0; font-size: 15px; }
.ya-market-panels textarea, .ya-market-panels input, .ya-contribution textarea, .ya-comments textarea, .ya-comments input { width: 100%; border: 1px solid var(--ya-border); border-radius: 11px; outline: 0; background: var(--ya-surface); padding: 11px; resize: vertical; }
.ya-market-panels textarea:focus, .ya-market-panels input:focus, .ya-contribution textarea:focus, .ya-comments textarea:focus, .ya-comments input:focus { border-color: var(--ya-accent-strong); box-shadow: 0 0 0 3px var(--ya-accent-soft); }
.ya-contribution { display: grid; gap: 11px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--ya-border); }
.ya-contribution h2 { margin: 0; }

.ya-profile-card { overflow: hidden; }
.ya-profile-cover { height: 118px; background: linear-gradient(135deg,var(--ya-surface-2),var(--ya-accent-soft)); border-bottom: 1px solid var(--ya-border); }
.ya-profile-body { position: relative; padding: 0 20px 20px; }
.ya-profile-body > .avatar { width: 92px; height: 92px; margin-top: -46px; border: 4px solid var(--ya-surface); border-radius: 50%; }
.ya-profile-actions { display: flex; justify-content: flex-end; gap: 8px; min-height: 50px; padding-top: 10px; }
.ya-profile-body h1 { margin: 4px 0 0; font-size: 27px; letter-spacing: -.035em; }
.ya-handle { margin: 3px 0 0; color: var(--ya-muted); font-size: 12px; }
.ya-profile-bio { max-width: 620px; margin: 13px 0 0; font-size: 13px; }
.ya-profile-stats { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 15px; color: var(--ya-muted); font-size: 11px; }
.ya-profile-stats strong { color: var(--ya-text); }
.ya-profile-tabs { display: flex; gap: 2px; padding: 0 12px; border-top: 1px solid var(--ya-border); overflow-x: auto; scrollbar-width: none; }
.ya-profile-tabs a { flex: 0 0 auto; padding: 12px 11px 10px; border-bottom: 2px solid transparent; color: var(--ya-muted); font-size: 11px; font-weight: 700; }
.ya-profile-tabs a.is-active { border-bottom-color: var(--ya-accent-strong); color: var(--ya-text); }
.ya-profile-feed { padding: 0; border: 0; background: transparent; }

.ya-comments { margin-top: 18px; padding: 20px; }
.ya-comments h2 { margin: 0 0 16px; font-size: 18px; }
.comment-list { display: grid; gap: 10px; margin: 0 0 20px; padding: 0; list-style: none; }
.comment-list .comment { min-width: 0; padding: 13px; border: 1px solid var(--ya-border); border-radius: 13px; background: var(--ya-bg); }
.comment-list .comment-body { min-width: 0; }
.comment-list .comment-author { display: flex; align-items: center; gap: 8px; }
.comment-list .avatar { border-radius: 50%; }
.comment-list .comment-meta { margin: 3px 0 9px; color: var(--ya-muted); font-size: 10px; }
.comment-list p { margin: 0 0 9px; font-size: 13px; line-height: 1.6; }
.comment-form { display: grid; gap: 10px; }
.comment-form p { margin: 0; }

.ya-notification-list { display: grid; gap: 0; }
.ya-notification { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 11px; padding: 13px 16px; border-bottom: 1px solid var(--ya-border); background: var(--ya-surface); }
.ya-notification.is-unread { background: var(--ya-accent-soft); }
.ya-notification .avatar { width: 40px; height: 40px; border-radius: 50%; }
.ya-notification p { margin: 2px 0; color: var(--ya-muted); font-size: 12px; }
.ya-notification small { color: var(--ya-muted); font-size: 10px; }

.ya-messages-shell { display: grid; min-height: calc(100vh - 56px); grid-template-columns: 290px minmax(0,1fr); background: var(--ya-surface); }
.ya-messages-shell aside { padding: 14px; border-right: 1px solid var(--ya-border); }
.ya-message-search { padding: 10px 12px; border-radius: 999px; background: var(--ya-surface-2); color: var(--ya-muted); font-size: 11px; }
.ya-empty-mini { padding: 24px 4px; color: var(--ya-muted); font-size: 11px; text-align: center; }
.ya-messages-shell > section { display: grid; place-items: center; min-width: 0; }
.ya-message-empty { max-width: 390px; padding: 28px; text-align: center; }
.ya-message-empty strong { font-size: 18px; }
.ya-message-empty p { color: var(--ya-muted); font-size: 12px; }
.ya-studio-placeholder { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 16px; padding: 18px; }
.ya-studio-placeholder p { margin: 4px 0 0; color: var(--ya-muted); font-size: 12px; }

.ya-social-action.is-loading { opacity: .5; pointer-events: none; }
.ya-social-toast { position: fixed; z-index: 999; right: 18px; bottom: 18px; max-width: min(380px,calc(100vw - 36px)); padding: 11px 14px; border-radius: 12px; background: var(--ya-text); color: var(--ya-surface); font-size: 12px; box-shadow: var(--ya-shadow); }

.ya-search-overlay { position: fixed; z-index: 300; inset: 0; display: grid; place-items: start center; padding: 80px 18px 18px; background: rgba(0,0,0,.42); backdrop-filter: blur(4px); }
.ya-search-overlay[hidden] { display: none; }
.ya-search-dialog { width: min(620px,100%); padding: 16px; border: 1px solid var(--ya-border); border-radius: 18px; background: var(--ya-surface); box-shadow: var(--ya-shadow); }
.ya-search-dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ya-search-dialog p { margin: 10px 4px 0; color: var(--ya-muted); font-size: 11px; }
body.ya-search-opened { overflow: hidden; }

.ya-work-stream { min-height: 100vh; background: #111; color: #f4f4f2; }
.ya-work-head { position: fixed; z-index: 30; inset: 14px 14px auto; display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; gap: 12px; }
.ya-work-head > div { text-align: center; }
.ya-work-head strong { display: block; font-size: 15px; }
.ya-work-head small { color: #aaa; font-size: 10px; }
.ya-work-head .ya-icon-button { background: rgba(255,255,255,.1); color: #fff; backdrop-filter: blur(10px); }
.ya-work-filters { position: fixed; z-index: 28; top: 72px; left: 50%; display: flex; max-width: calc(100vw - 30px); gap: 7px; transform: translateX(-50%); overflow-x: auto; scrollbar-width: none; }
.ya-work-filters button { flex: 0 0 auto; padding: 7px 11px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; background: rgba(20,20,20,.72); color: #ddd; font-size: 10px; }
.ya-work-filters button.is-active { background: var(--ya-accent); color: var(--ya-accent-ink); }
.ya-work-list { height: 100vh; overflow-y: auto; scroll-snap-type: y mandatory; }
.ya-work-item { display: grid; min-height: 100vh; place-items: center; padding: 112px 18px 24px; scroll-snap-align: start; }
.ya-work-card { display: grid; width: min(100%,560px); max-height: calc(100vh - 136px); overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 20px; background: #202020; box-shadow: 0 26px 80px rgba(0,0,0,.38); }
.ya-work-card header { display: flex; align-items: center; gap: 10px; padding: 14px; }
.ya-work-card header .avatar { width: 42px; height: 42px; border-radius: 50%; }
.ya-work-card header span { display: grid; }
.ya-work-card header small { color: #aaa; font-size: 10px; }
.ya-work-media { min-height: 0; overflow: hidden; }
.ya-work-media img { display: block; width: 100%; max-height: 52vh; object-fit: cover; }
.ya-work-copy { padding: 15px; overflow: auto; }
.ya-work-copy h2 { margin: 0 0 8px; font-size: 20px; }
.ya-work-copy p { margin: 0; color: #ccc; font-size: 13px; line-height: 1.6; }
.ya-work-card footer { display: flex; justify-content: center; gap: 8px; padding: 10px 14px 14px; }
.ya-work-card footer a, .ya-work-card footer button { display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; }

@media (max-width: 1220px) {
  .ya-main { grid-template-columns: minmax(0,var(--ya-feed)); width: min(100%,calc(var(--ya-feed) + 48px)); }
  .ya-right-rail { display: none; }
}

@media (max-width: 920px) {
  .ya-stage { margin-left: 0; padding-top: 58px; }
  .ya-mobile-topbar { position: fixed; z-index: 100; inset: 0 0 auto; display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 8px; height: 58px; padding: 0 12px; border-bottom: 1px solid var(--ya-border); background: rgba(247,247,245,.94); backdrop-filter: blur(14px); }
  html[data-theme="dark"] .ya-mobile-topbar { background: rgba(23,23,23,.94); }
  @media (prefers-color-scheme: dark) { html[data-theme="auto"] .ya-mobile-topbar { background: rgba(23,23,23,.94); } }
  .ya-mobile-brand { justify-self: center; font-size: 16px; font-weight: 760; letter-spacing: -.025em; }
  .ya-mobile-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
  .ya-menu-button { display: inline-grid; }
  .ya-sidebar { width: min(86vw,300px); transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--ya-shadow); }
  .ya-sidebar.is-open { transform: translateX(0); }
  .ya-sidebar-head { align-items: center; }
  .ya-drawer-close { display: inline-grid !important; }
  .ya-drawer-backdrop { position: fixed; z-index: 110; inset: 0; background: rgba(0,0,0,.38); }
  .ya-drawer-backdrop[hidden] { display: none; }
  body.ya-drawer-open { overflow: hidden; }
  .ya-main, .ya-main-wide { width: min(100%,730px); grid-template-columns: minmax(0,1fr); padding: 0 18px 84px; }
  .ya-main-wide .ya-content { padding-top: 18px; }
}

@media (max-width: 680px) {
  body { font-size: 14px; }
  .ya-stage { padding-bottom: 68px; }
  .ya-main, .ya-main-wide { width: 100%; padding: 0 0 74px; }
  .ya-content, .ya-main-wide .ya-content { min-height: calc(100vh - 58px); border: 0; background: var(--ya-surface); padding-top: 0; }
  .ya-mobile-nav { position: fixed; z-index: 90; inset: auto 0 0; display: grid; grid-template-columns: repeat(5,1fr); min-height: 66px; padding: 6px max(8px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); border-top: 1px solid var(--ya-border); background: rgba(247,247,245,.96); backdrop-filter: blur(14px); }
  html[data-theme="dark"] .ya-mobile-nav { background: rgba(23,23,23,.96); }
  @media (prefers-color-scheme: dark) { html[data-theme="auto"] .ya-mobile-nav { background: rgba(23,23,23,.96); } }
  .ya-mobile-nav a { display: grid; place-items: center; align-content: center; gap: 3px; color: var(--ya-muted); font-size: 9px; }
  .ya-mobile-nav a.is-active { color: var(--ya-text); }
  .ya-mobile-nav a.is-active .ya-icon { color: var(--ya-accent-strong); }
  .ya-mobile-create .ya-icon { width: 36px; height: 36px; padding: 9px; border-radius: 50%; background: var(--ya-accent); color: var(--ya-accent-ink); }
  .ya-social-heading, .ya-safe-heading, .ya-page-heading { grid-template-columns: minmax(0,1fr); align-items: stretch; gap: 10px; padding: 13px 14px 10px !important; }
  .ya-social-heading h1, .ya-safe-heading h1, .ya-page-heading h1 { font-size: 20px !important; }
  .ya-social-heading p, .ya-safe-heading p, .ya-page-heading p { font-size: 11px !important; }
  .ya-feed-tabs { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .ya-feed-tabs a { flex: 1 0 auto; text-align: center; }
  .ya-composer { grid-template-columns: 40px minmax(0,1fr); padding: 12px 13px; }
  .ya-composer > .avatar { width: 40px; height: 40px; }
  .ya-composer textarea { min-height: 54px; font-size: 15px; }
  .ya-composer-links span { display: none; }
  .ya-post-head { padding: 12px 13px 0; }
  .ya-author .avatar { width: 40px; height: 40px; }
  .ya-chip { display: none; }
  .ya-post-body { padding: 9px 13px 11px 63px; }
  .ya-post-body h2 { font-size: 17px; }
  .ya-post-copy { font-size: 13px; }
  .ya-post-actions { display: flex; padding: 0 8px 7px 53px; overflow-x: auto; scrollbar-width: none; }
  .ya-post-actions a, .ya-post-actions button { flex: 0 0 auto; min-width: 70px; }
  .ya-post-actions span { display: inline; }
  .ya-library-grid, .ya-market-grid { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 12px; }
  .ya-safe-list { padding: 12px; }
  .ya-card-copy { padding: 11px; }
  .ya-card-copy h2 { font-size: 13px; }
  .ya-card-copy p { display: none; }
  .ya-term-grid { padding: 12px; }
  .ya-term-card { grid-template-columns: 38px minmax(0,1fr) 18px; padding: 12px; }
  .ya-term-icon { width: 38px; height: 38px; }
  .ya-book-detail, .ya-market-detail { grid-template-columns: minmax(0,1fr); gap: 20px; margin: 12px; padding: 18px; }
  .ya-book-cover, .ya-market-image { width: min(70vw,280px); margin: 0 auto; }
  .ya-book-info h1, .ya-market-info h1 { font-size: 28px; }
  .ya-market-panels { grid-template-columns: minmax(0,1fr); }
  .ya-article { margin: 12px; padding: 18px; }
  .ya-article-head h1 { font-size: 29px; }
  .ya-section, .ya-comments { margin: 12px; padding: 16px; }
  .ya-profile-card { border-inline: 0; border-radius: 0; }
  .ya-profile-body { padding-inline: 15px; }
  .ya-profile-actions { flex-wrap: wrap; }
  .ya-messages-shell { min-height: calc(100vh - 124px); grid-template-columns: minmax(0,1fr); }
  .ya-messages-shell aside { border-right: 0; border-bottom: 1px solid var(--ya-border); }
  .ya-studio-placeholder { align-items: stretch; flex-direction: column; margin: 12px; }
  .ya-studio-placeholder .ya-primary-button { width: 100%; }
  .ya-social-toast { right: 12px; bottom: 80px; }
}

@media (max-width: 430px) {
  .ya-library-grid, .ya-market-grid { grid-template-columns: minmax(0,1fr); }
  .ya-card-copy p { display: block; }
  .ya-post-actions a, .ya-post-actions button { min-width: 64px; font-size: 9px; }
  .ya-post-actions .ya-icon { width: 17px; height: 17px; }
  .ya-composer-tools { align-items: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
