/* Notabenoid — «Открытия»: обновления, топы, жанры/теги, заявки на перевод.
 * Только переменные темы из nb.css, никаких жёстких цветов. Префикс классов: dc-. */

/* ------------------------------------------------------------ фильтры */
.nb-card.dc-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; padding: 12px 16px; margin: 0 0 26px; }
.dc-filter-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dc-filter-group .nb-eyebrow { margin: 0 4px 0 0; }
.dc-filter-group select { width: auto; max-width: 190px; min-height: 30px; padding: 3px 8px; font-size: 13px; margin: 0; }
.dc-filters .nb-chip svg { vertical-align: -2px; margin-right: 2px; }
.dc-reset { margin-left: auto; font-size: 12.5px; color: var(--muted-foreground); display: inline-flex; align-items: center; gap: 4px; }
.dc-reset:hover { color: var(--foreground); }
.dc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 20px; }
.dc-toolbar .dc-filter-group { gap: 6px; }

/* ------------------------------------------------------------ лента обновлений */
.dc-day + .dc-day { margin-top: 26px; }
.dc-day-h { font-size: 15px; font-weight: 700; margin: 0 0 10px; display: flex; align-items: baseline; gap: 10px; }
.dc-day-h span { font-size: 12px; font-weight: 500; color: var(--muted-foreground); }
.nb-card.dc-list { padding: 6px; }
.dc-list > .nb-list-row + .nb-list-row { border-top: 1px solid var(--border); border-radius: 0; }
.dc-list > .nb-list-row:hover { border-radius: var(--radius-lg); }
.dc-list > .nb-list-row:hover + .nb-list-row { border-top-color: transparent; }
/* строки /updates — общий партиал ленты главной //site/_upd_row, стили .hm-upd — www/css/modules/home.css */
.dc-when { flex: none; text-align: right; font-size: 12px; color: var(--muted-foreground); line-height: 1.35; padding-top: 2px; min-width: 76px; }
.dc-when b { display: block; font-size: 13.5px; color: var(--foreground); font-variant-numeric: tabular-nums; font-weight: 600; }
.dc-pager { margin-top: 26px; display: flex; justify-content: center; }
.dc-pager .pagination { margin: 0; }

/* ------------------------------------------------------------ топы */
.dc-period { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -6px 0 18px; }
.dc-period .nb-eyebrow { margin: 0 6px 0 0; }
.nb-card.dc-top { padding: 6px; }
.dc-top-row { align-items: center; }
.dc-top-row + .dc-top-row { border-top: 1px solid var(--border); border-radius: 0; }
.dc-top-row:hover { border-radius: var(--radius-lg); }
.dc-top-row:hover + .dc-top-row { border-top-color: transparent; }
.dc-top-row.is-top { background: color-mix(in oklab, var(--rating) 7%, transparent); border-radius: var(--radius-lg); }
.dc-top-row.is-top + .dc-top-row { border-top-color: transparent; }
.dc-top-row.is-top .nb-cover { width: 64px; box-shadow: var(--elev-2); }
.dc-top-row.is-top .nb-rank.top { color: var(--rating-text); font-size: 22px; }
.dc-top-row .body .t { font-size: 14.5px; }
.dc-top-row .body .orig { font-size: 12.5px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-ready { display: flex; align-items: center; gap: 8px; margin-top: 6px; max-width: 280px; font-size: 11.5px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.dc-ready .nb-progress { flex: 1; height: 5px; }
.dc-ready .nb-progress > i { background: var(--success); }
.dc-score { flex: none; text-align: right; min-width: 90px; }
.dc-score b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.dc-score b .nb-rating { font-size: 17px; }
.dc-score small { font-size: 11.5px; color: var(--muted-foreground); }
.dc-note-line { font-size: 12.5px; color: var(--muted-foreground); margin: 14px 2px 0; }

/* компактные ленты для главной */
.dc-rail { display: grid; gap: 2px; }
.dc-rail .nb-list-row { padding: 8px 10px; gap: 12px; }
.dc-rail .nb-list-row .nb-cover { width: 40px; border-radius: var(--radius-sm); }
.dc-rail .nb-list-row .nb-cover .ph { font-size: 16px; }
.dc-rail .nb-list-row .nb-cover .ph small { display: none; }
.dc-rail .nb-list-row .t { font-size: 13.5px; }
.dc-rail .nb-list-row .m { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-rail .nb-rank { width: 24px; font-size: 15px; }
.dc-rail .dc-when { min-width: 0; font-size: 11.5px; }
.dc-rail .dc-score { min-width: 0; }
.dc-rail .dc-score b { font-size: 14px; }

/* ------------------------------------------------------------ жанры и теги */
.dc-genres { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.dc-genre { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); color: var(--foreground); min-height: 64px; transition: box-shadow .2s, transform .2s; }
.dc-genre:hover { text-decoration: none; color: var(--foreground); box-shadow: var(--elev-2); transform: translateY(-1px); }
.dc-genre .txt { min-width: 0; flex: 1; }
.dc-genre .txt b { display: block; font-size: 15px; font-weight: 650; }
.dc-genre .txt span { font-size: 12px; color: var(--muted-foreground); white-space: nowrap; }
.dc-genre.is-empty { opacity: .62; }
.dc-stack { display: flex; flex: none; }
.dc-stack .nb-cover { width: 32px; border-radius: var(--radius-sm); box-shadow: var(--elev-1); }
.dc-stack .nb-cover + .nb-cover { margin-left: -16px; }
.dc-stack .nb-cover .ph { font-size: 14px; padding: 2px; }
.dc-stack .nb-cover .ph small { display: none; }
.dc-stack .nb-cover .ready { display: none; }
.dc-stack-empty { width: 32px; aspect-ratio: 2 / 3; border-radius: var(--radius-sm); border: 1px dashed var(--border); display: grid; place-items: center; color: var(--muted-foreground); flex: none; }

.dc-cloud { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dc-cloud .nb-chip { gap: 6px; }
.dc-cloud .nb-chip.s2 { font-size: 13px; padding: 4px 11px; }
.dc-cloud .nb-chip.s3 { font-size: 14px; padding: 5px 13px; font-weight: 650; }
.dc-cloud .nb-chip.s4 { font-size: 15.5px; padding: 6px 15px; font-weight: 700; }
.dc-cloud .nb-chip.is-empty { opacity: .6; }
.dc-count { font-size: .82em; color: var(--muted-foreground); font-weight: 500; font-variant-numeric: tabular-nums; }
.nb-chip.is-active .dc-count { color: inherit; opacity: .7; }

/* чипы жанров/тегов на странице книги (_book_tags) */
.dc-book-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0; }
.dc-book-tags .nb-chip.genre { font-weight: 650; background: var(--secondary); }
.dc-book-tags .dc-edit { font-size: 12.5px; color: var(--muted-foreground); display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; }
.dc-book-tags .dc-edit:hover { color: var(--foreground); }

/* редактор тегов */
.dc-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.dc-pick label { margin: 0; cursor: pointer; }
.dc-pick input { position: absolute; opacity: 0; pointer-events: none; }
.dc-pick label span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--card); color: var(--foreground); font-size: 13px; font-weight: 550; transition: background .15s, border-color .15s; }
.dc-pick label:hover span { background: var(--muted); }
.dc-pick input:checked + span { background: var(--primary); color: var(--primary-foreground); border-color: transparent; }
.dc-pick input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: 2px; }
.dc-pick input:disabled + span { opacity: .45; cursor: not-allowed; }
.dc-counter { font-size: 12.5px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; font-weight: 500; letter-spacing: 0; text-transform: none; }
.dc-counter.full { color: var(--warning); }
.dc-sticky-actions { position: sticky; bottom: 0; padding: 14px 0; margin-top: 18px; background: color-mix(in oklab, var(--background) 88%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; z-index: 5; }

/* ------------------------------------------------------------ заявки на перевод */
.dc-req-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .dc-req-layout { grid-template-columns: minmax(0, 1fr); } }
.dc-req-tabs { margin-bottom: 16px; }
.dc-req-tabs .dc-count { margin-left: 4px; }
.dc-search { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 18px; }
.dc-search input[type="search"] { flex: 1; min-width: 200px; max-width: 420px; margin: 0; }
.dc-seg { display: inline-flex; flex: none; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--card-solid); }
.dc-seg a { display: inline-flex; align-items: center; white-space: nowrap; padding: 5px 12px; font-size: 13px; color: var(--muted-foreground); }
.dc-seg a:hover { color: var(--foreground); text-decoration: none; background: var(--muted); }
.dc-seg a.on { background: var(--primary); color: var(--primary-foreground); }

.nb-card.dc-req { display: flex; gap: 16px; padding: 16px 18px; align-items: flex-start; }
.nb-card.dc-req + .nb-card.dc-req { margin-top: 12px; }
.dc-req .body { flex: 1; min-width: 0; }
.dc-req h3 { margin: 0; font-size: 16.5px; line-height: 1.3; }
.dc-req h3 a { color: var(--foreground); }
.dc-req .orig { font-size: 13px; color: var(--muted-foreground); margin-top: 2px; }
.dc-req .descr { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--foreground); opacity: .9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dc-req .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted-foreground); }
.dc-req .meta a { color: var(--muted-foreground); }
.dc-req .meta a:hover { color: var(--foreground); }
.dc-req .meta svg { vertical-align: -2px; }
.dc-req .taken { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--foreground); }
.dc-req.is-closed { opacity: .78; }

.dc-vote { flex: none; width: 60px; display: grid; justify-items: center; gap: 2px; padding: 8px 0 7px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card-solid); color: var(--foreground); cursor: pointer; font: inherit; transition: border-color .15s, background .15s, transform .1s; }
.dc-vote:hover { border-color: var(--ring); text-decoration: none; color: var(--foreground); }
.dc-vote:active { transform: scale(.97); }
.dc-vote svg { color: var(--muted-foreground); }
.dc-vote b { font-size: 17px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.dc-vote small { font-size: 10.5px; color: var(--muted-foreground); line-height: 1.2; }
.dc-vote.on { background: var(--primary); color: var(--primary-foreground); border-color: transparent; }
.dc-vote.on svg, .dc-vote.on small { color: var(--primary-foreground); opacity: .85; }
.dc-vote[disabled] { cursor: default; opacity: .7; }
.dc-vote-lg { width: 76px; padding: 10px 0; }
.dc-vote-lg b { font-size: 22px; }

.dc-req-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 20px; }
.dc-req-head .body { flex: 1; min-width: 0; }
.dc-req-head h1 { margin: 6px 0 4px; font-size: clamp(24px, 3vw, 32px); overflow-wrap: anywhere; }
.dc-req-head .orig { color: var(--muted-foreground); font-size: 14.5px; }
.dc-req-head .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; color: var(--muted-foreground); font-size: 13px; }
.dc-req-head .meta svg { vertical-align: -3px; }
.dc-req-descr { font-family: var(--font-serif); font-size: 15.5px; line-height: 1.75; white-space: pre-line; }
.dc-side .nb-card h4 { margin: 0 0 10px; font-size: 14px; }
.dc-side .nb-card p { font-size: 13.5px; }
.dc-side .nb-card select { width: 100%; margin: 0 0 10px; }
.dc-side .nb-card .nb-btn { width: 100%; justify-content: center; }
.dc-side .nb-card .nb-btn + .nb-btn { margin-top: 8px; }
.dc-side .nb-card textarea { width: 100%; margin: 0 0 8px; min-height: 64px; }
.dc-side dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13px; }
.dc-side dt { color: var(--muted-foreground); font-weight: 500; }
.dc-side dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.dc-book-link { display: flex; gap: 12px; align-items: center; color: var(--foreground); }
.dc-book-link:hover { text-decoration: none; color: var(--foreground); }
.dc-book-link .nb-cover { width: 48px; flex: none; border-radius: var(--radius); }
.dc-book-link b { display: block; font-size: 14px; line-height: 1.3; }
.dc-book-link small { color: var(--muted-foreground); }
/* заявка: тайтл в карточке статуса, «У меня уже есть перевод», подсказка взявшему */
.dc-take-book { margin-bottom: 12px; }
.dc-take-book > a { flex: none; }
.dc-take-book > span { min-width: 0; }
.dc-take-book a b { color: var(--foreground); overflow-wrap: anywhere; }
.dc-take-book a:hover b { text-decoration: underline; }
.dc-take-book small a { color: var(--link); font-weight: 600; }
.dc-take-own { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.dc-take-own > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--link); list-style: none; display: flex; gap: 6px; align-items: center; }
.dc-take-own > summary::-webkit-details-marker { display: none; }
.dc-take-own > summary:hover { text-decoration: underline; }
.dc-take-own[open] > summary { margin-bottom: 10px; }
.dc-take-own p.nb-muted { margin: 0 0 8px; font-size: 12.5px; }
.dc-take-own input[type=number] { width: 100%; margin: 0 0 10px; }
.dc-take-hint { margin: 0 0 10px; font-size: 12.5px !important; line-height: 1.5; }
.dc-take-hint a { white-space: nowrap; }

.dc-notes { display: grid; gap: 4px; }
.dc-note { display: flex; gap: 12px; padding: 12px 4px; }
.dc-note + .dc-note { border-top: 1px solid var(--border); }
.dc-note .nb-avatar { width: 30px; height: 30px; font-size: 12px; }
.dc-note .body { flex: 1; min-width: 0; }
.dc-note .head { font-size: 12.5px; color: var(--muted-foreground); display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.dc-note .head a.user { font-weight: 650; color: var(--foreground); font-size: 13.5px; }
.dc-note .text { margin-top: 3px; font-size: 14px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.dc-note.is-event { align-items: center; padding: 8px 4px; }
.dc-note.is-event .ev { width: 30px; height: 30px; border-radius: var(--radius-pill); display: grid; place-items: center; background: var(--secondary); color: var(--muted-foreground); flex: none; }
.dc-note.is-event .text { margin: 0; font-size: 13px; color: var(--muted-foreground); }
.dc-note-form textarea { width: 100%; min-height: 90px; margin: 0 0 10px; }

.dc-form { max-width: 760px; }
.dc-form .field { margin-bottom: 16px; }
.dc-form .field > label { display: block; margin-bottom: 6px; }
.dc-form .field input[type="text"], .dc-form .field input[type="url"], .dc-form .field textarea, .dc-form .field select { width: 100%; margin: 0; }
.dc-form .field textarea { min-height: 140px; }
.dc-form .hint { font-size: 12.5px; color: var(--muted-foreground); margin-top: 4px; }
.dc-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .dc-form .row2 { grid-template-columns: 1fr; } }
.dc-form .errorMessage { font-size: 12.5px; margin-top: 4px; }
.dc-form .field.error input, .dc-form .field.error textarea, .dc-form .field.error select { border-color: var(--destructive); }
.dc-similar { border: 1px solid color-mix(in oklab, var(--warning) 45%, transparent); background: color-mix(in oklab, var(--warning) 9%, var(--card-solid)); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 16px; }
.dc-similar ul { margin: 6px 0 0 18px; }
.dc-similar li { margin: 2px 0; }
.dc-live-similar { font-size: 12.5px; margin-top: 6px; color: var(--warning); }
.dc-live-similar a { color: inherit; text-decoration: underline; }

@media (max-width: 640px) {
	.dc-when { min-width: 0; }
	.dc-when small { display: none; }
	.dc-score { min-width: 0; }
	.dc-top-row .dc-score small { display: none; }
	.dc-top-row .nb-cover, .dc-top-row.is-top .nb-cover { width: 44px; }
	.dc-top-row .nb-rank { width: 22px; font-size: 15px; }
	.dc-list .nb-list-row, .dc-top .nb-list-row { padding: 10px 8px; gap: 10px; }
	.dc-genres { grid-template-columns: 1fr; }
	.dc-search .dc-seg { margin-left: 0; }
	.dc-req-head { gap: 12px; }
	.dc-vote-lg { width: 60px; }
	.nb-card.dc-req { padding: 14px; gap: 12px; }
	.dc-vote { width: 52px; }
	.dc-filters { gap: 10px 14px; }
	.dc-reset { margin-left: 0; }
}

/* ------------------------------------------------------------ телефоны: поля и переключатели под палец */
@media (max-width: 640px) {
	.dc-search input[type="search"] { flex: 1 1 200px; min-width: 0; max-width: none; height: 40px; }
	.dc-search .nb-btn { height: 40px; }
	.dc-search .nb-spacer { display: none; }
	.dc-seg a { min-height: 34px; }
	.dc-req-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	.dc-req-tabs::-webkit-scrollbar { display: none; }
	.dc-req-tabs > li { flex: none; }
}

/* ------------------------------------------------------------ touch screens and phones
   Genre / tag chips were 28 px tall (home cloud, title page) and "edit" next to the tags a 19 px line. */
@media (max-width: 760px), (pointer: coarse) {
	.dc-cloud .nb-chip, .dc-book-tags .nb-chip { min-height: 36px; }
	.dc-book-tags .dc-edit { min-height: 36px; padding: 0 8px; margin-left: 0; }
}
