/* ═══ MangaNew — сторінка тайтлу: один потік на всю ширину, без бокової колонки.
   Порядок: верх (обкладинка + інформація) → перші сторінки → опис і інформація поруч → розділи → оцінка → коментарі ═══ */
:root { --ink: #14161b; --paper: #f6f3ea; --frame: var(--ink); }
[data-theme="dark"] { --frame: #d4d0c4; }
.mt { --gap: 36px; }

/* ── 1. Верх ── */
.mt-top { position: relative; isolation: isolate; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; padding: 6px 0 36px; }
.mt-top::before { content: ""; position: absolute; z-index: -1; inset: -20px -20px 0 30%; background: radial-gradient(circle, rgba(127, 127, 127, .2) 1.2px, transparent 1.6px) 0 0 / 9px 9px; -webkit-mask-image: radial-gradient(ellipse at 75% 25%, #000 15%, transparent 65%); mask-image: radial-gradient(ellipse at 75% 25%, #000 15%, transparent 65%); pointer-events: none; }
.mt-cover { position: relative; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 3px solid var(--frame); box-shadow: 8px 8px 0 var(--frame); }
[data-theme="dark"] .mt-cover { box-shadow: 8px 8px 0 rgba(233, 230, 220, .16); }
.mt-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mt-cover__age { position: absolute; left: 10px; top: 10px; padding: 2px 8px; border-radius: 4px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 800; transform: rotate(-4deg); }
.mt-info { min-width: 0; display: flex; flex-direction: column; gap: 18px; }

.mt-title { margin: 0; font-family: var(--font-head); font-size: clamp(30px, 4vw, 48px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; }
.mt-alt { margin: -8px 0 0; font-size: 15px; color: var(--muted); }
.mt-alt:empty { display: none; }

.mt-tags-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mt-tag { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 12px; border-radius: 8px; background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--text); }
.mt-tag:empty { display: none; }
.mt-tag a { color: inherit; }
.mt-tag--type { background: var(--accent); color: var(--accent-ink); text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
.mt-tag--warn { background: var(--hot); color: var(--hot-ink); }
.mt-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.mt-status[data-status*="Трива"]::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(63, 179, 127, .2); }
.mt-status[data-status*="Заверш"]::before, .mt-status[data-status*="Закінч"]::before { background: var(--accent); }
.mt-format { color: var(--muted); }

/* Плитки показників */
.mt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.mt-stat { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--surface); }
.mt-stat__val { font-family: var(--font-head); font-size: 24px; font-weight: 700; line-height: 1.1; }
.mt-stat__val small { font-size: 15px; font-weight: 600; color: var(--muted); }
.mt-stat__label { font-size: 12px; color: var(--muted); }
.mt-stat--score .mt-stat__val { color: var(--hot); }
.mt-stat--score .mt-stat__val::before { content: "★ "; font-size: .8em; }
.mt-stat--prog { grid-column: span 2; }
.mt-stat__bar { height: 6px; margin-top: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.mt-stat__bar span { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--accent), #6fd3ff); transition: width .7s ease; }

/* Жанри */
.mt-genres { display: flex; flex-wrap: wrap; gap: 8px; }
.mt-genres a { --h: 200; padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; color: hsl(var(--h) 70% 72%); background: hsl(var(--h) 60% 50% / .14); }
[data-theme="light"] .mt-genres a { color: hsl(var(--h) 60% 34%); background: hsl(var(--h) 70% 50% / .12); }
.mt-genres a:hover { filter: brightness(1.15); }
.mt-genres a:nth-child(6n+1) { --h: 200; } .mt-genres a:nth-child(6n+2) { --h: 330; } .mt-genres a:nth-child(6n+3) { --h: 145; }
.mt-genres a:nth-child(6n+4) { --h: 35; } .mt-genres a:nth-child(6n+5) { --h: 265; } .mt-genres a:nth-child(6n+6) { --h: 5; }

/* ── Кнопки ── */
.mt-actions { display: flex; flex-direction: column; gap: 12px; }
.mt-actions__main, .mt-actions__more { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.mt-btn { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 22px 0 18px; border-radius: 14px; font-weight: 700; transition: transform .12s ease, box-shadow .15s ease, color .15s ease; }
.mt-btn:active { transform: translateY(1px) scale(.99); }
.mt-btn[hidden] { display: none; }
.mt-btn__ico { width: 22px; height: 22px; flex: none; }
.mt-btn__text { display: flex; flex-direction: column; line-height: 1.15; }
.mt-btn__text > span { font-size: 16px; }
.mt-btn__text small { font-size: 12px; font-weight: 600; opacity: .8; }
.mt-btn__text small:empty, .mt-btn__text small[hidden] { display: none; }
.mt-btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 12px 26px -12px var(--accent), inset 0 -3px 0 rgba(0, 0, 0, .15); }
.mt-btn--primary:hover { color: var(--accent-ink); transform: translateY(-2px); }
.mt-btn--primary .mt-btn__ico { width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.mt-btn--outline { color: var(--text); box-shadow: inset 0 0 0 2px var(--line); }
.mt-btn--outline:hover { color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }

.mt-chipbtn, .mt-lists .edit-trigger, .mt-subscribe .subbutt {
  --ico: none; display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 16px 0 14px;
  border: 0; border-radius: 12px; background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s;
}
.mt-chipbtn::before, .mt-lists .edit-trigger::before, .mt-subscribe .subbutt::before { content: ""; width: 18px; height: 18px; flex: none; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.mt-chipbtn:hover, .mt-lists .edit-trigger:hover, .mt-subscribe .subbutt:hover { background: var(--accent-soft); color: var(--text); }
.mt-lists .edit-trigger { --ico: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M6 3h12v18l-6-4-6 4z'/%3E%3C/svg%3E"); }
.mt-chipbtn--collection { --ico: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='13' rx='2'/%3E%3Cpath d='M6 5h12M9 2h6'/%3E%3C/svg%3E"); }
.mt-subscribe .subbutt { --ico: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 1 1 12 0c0 7 3 9 3 9H3s3-2 3-9'/%3E%3Cpath d='M10 21a2 2 0 0 0 4 0'/%3E%3C/svg%3E"); }
.mt-subscribe:empty { display: none; }
.mt-subscribe .subscribe-container { display: contents; }
.mt-subscribe .subbutt i { display: none; }
.mt-subscribe .subbutt.subscribe_from { background: var(--accent); color: var(--accent-ink); }
.mt-subscribe .subbutt.subscribe_from:hover { background: var(--danger); color: #fff; }

/* Меню списків (super_lists) і колекцій (playlists) */
.mt-lists, .playlist-add-area { position: relative; }
.mt-lists { --l-reading: var(--ok); --l-readed: var(--accent); --l-planned: var(--warn); --l-reread: #8b7bff; --l-postponed: #9aa3b2; --l-abandoned: var(--danger); --l-favorite: #ff5c9a; }
.mt-lists .trigger { cursor: pointer; }
.mt-lists .edit-trigger .edit, .mt-lists .status-name i, .mt-lists .option i { display: none; }
.mt-lists .edit-trigger .text::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); opacity: .6; }
.mt-lists .expanded-options, .playlist-add-window { position: absolute; z-index: 30; left: 0; top: calc(100% + 6px); min-width: 240px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.mt-lists .expanded-options { display: none; }
.mt-lists .option { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; cursor: pointer; font-size: 14px; }
.mt-lists .option:hover { background: var(--surface-2); }
.mt-lists .option::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.mt-lists .option[onclick*="'reading'"]::before { background: var(--l-reading); }
.mt-lists .option[onclick*="'readed'"]::before { background: var(--l-readed); }
.mt-lists .option[onclick*="'planned'"]::before { background: var(--l-planned); }
.mt-lists .option[onclick*="'reread'"]::before { background: var(--l-reread); }
.mt-lists .option[onclick*="'postponed'"]::before { background: var(--l-postponed); }
.mt-lists .option[onclick*="'abandoned'"]::before { background: var(--l-abandoned); }
.mt-lists .option[onclick*="'favorite'"]::before { background: var(--l-favorite); }
.mt-lists .option.remove-trigger { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; color: var(--danger); }
.mt-lists .option.remove-trigger::before { background: transparent; border: 2px solid var(--danger); width: 6px; height: 6px; }
.playlist-add-window { display: none; width: 280px; padding: 12px; }
.playlist-add-window h3 { margin: 0 0 8px; font-size: 14px; }
.playlist-add-area.active .playlist-add-window, .playlist-add-window.active { display: block; }

/* Рядок редактора */
.mt-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }
.mt-tools > a { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-weight: 600; }
.mt-tools > a::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16z'/%3E%3C/svg%3E") center / contain no-repeat; }
.mt-tools > a:hover { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mt-tools__note { display: inline-flex; align-items: center; gap: 6px; }
.mt-tools__note::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.mt-tools__note--ok { color: var(--ok); }
.mt-tools__note--ok::before { background: var(--ok); }

/* ── Секції ── */
.mt-sec { padding: 30px 0; border-top: 1px solid var(--line); }
.mt-sec__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.mt-h { display: inline-block; margin: 0 0 18px; padding: 6px 14px; border-radius: 4px; background: var(--frame); color: var(--bg); font-family: var(--font-head); font-size: 17px; font-weight: 700; transform: skewX(-6deg); box-shadow: 4px 4px 0 var(--accent); }
.mt-sec__head .mt-h { margin: 0; }
.mt-h3 { margin: 24px 0 12px; font-family: var(--font-head); font-size: 15px; font-weight: 700; }
.mt-count { font-family: var(--font); font-size: 14px; font-weight: 600; opacity: .7; }
.mt-more, .mt-link-btn { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.mt-empty { margin: 0; padding: 16px 0; color: var(--muted); }

/* ── 2. Перші сторінки ── */
.mt-pages { display: grid; grid-auto-flow: column; grid-auto-columns: 136px; gap: 16px; overflow-x: auto; padding: 4px 8px 14px 2px; scrollbar-width: thin; }
.mt-page { position: relative; display: block; aspect-ratio: 12 / 17; border: 3px solid var(--frame); border-radius: 4px; overflow: hidden; background: var(--paper); box-shadow: 5px 5px 0 var(--frame); transition: transform .15s ease; }
[data-theme="dark"] .mt-page { box-shadow: 5px 5px 0 rgba(233, 230, 220, .16); }
.mt-page:nth-child(odd) { transform: rotate(-1.2deg); }
.mt-page:nth-child(even) { transform: rotate(1deg); }
.mt-page:hover { transform: translateY(-4px) rotate(0); }
.mt-page img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mt-page__n { position: absolute; right: 0; bottom: 0; min-width: 26px; padding: 2px 6px; background: var(--ink); color: #fff; font-family: var(--font-head); font-size: 12px; font-weight: 700; text-align: center; }

/* ── 3. Опис + Інформація ── */
.mt-about { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 48px; align-items: start; }
.mt-desc { font-size: 16px; line-height: 1.75; }
.mt-desc.is-clamped { max-height: 10em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.mt-more { margin-top: 10px; }
.mt-tags { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 16px 0 0; font-size: 13px; }
.mt-tags a { color: var(--muted); }
.mt-tags a::before { content: "#"; color: var(--accent); }
.mt-facts { margin: 0; display: flex; flex-direction: column; }
.mt-facts div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.mt-facts div:first-child { padding-top: 0; }
.mt-facts dt { color: var(--muted); }
.mt-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.mt-facts a { color: var(--text); }
.mt-facts a:hover { color: var(--accent); }

/* Смужки «У списках користувачів» */
.mt-userlists { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mt-userlists .line { display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: center; gap: 10px; }
.mt-userlists .x_label { font-size: 13px; color: var(--muted); }
.mt-userlists .line.active .x_label { color: var(--text); font-weight: 700; }
.mt-userlists .bar-container { height: 22px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.mt-userlists .bar { position: relative; height: 100%; min-width: 36px; border-radius: 6px; background: var(--accent); }
.mt-userlists .value { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.mt-userlists .line:nth-child(1) .bar { background: var(--ok); } .mt-userlists .line:nth-child(2) .bar { background: var(--accent); }
.mt-userlists .line:nth-child(3) .bar { background: var(--warn); } .mt-userlists .line:nth-child(4) .bar { background: #8b7bff; }
.mt-userlists .line:nth-child(5) .bar { background: #9aa3b2; } .mt-userlists .line:nth-child(6) .bar { background: var(--danger); }
.mt-userlists .line:nth-child(7) .bar { background: #ff5c9a; }

/* ── 4. Розділи ── */
.mt-ch-tools { display: flex; align-items: center; gap: 16px; }
.mt-find input { width: 140px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.mt-find input:focus { outline: 0; border-color: var(--accent); }
.mt-chapters { max-height: 720px; overflow: auto; }
.mt-vol { display: flex; align-items: center; gap: 12px; margin: 22px 0 8px; font-size: 15px; }
.mt-vol:first-child { margin-top: 0; }
.mt-vol__spine { display: grid; place-items: center; width: 34px; height: 46px; border: 2px solid var(--frame); border-radius: 3px 6px 6px 3px; background: linear-gradient(90deg, var(--accent) 0 6px, var(--surface) 6px); font-family: var(--font-head); font-size: 15px; font-weight: 700; }
.mt-vol__label { font-family: var(--font-head); font-weight: 700; }
.mt-vol__count { font-size: 12px; color: var(--muted); }
.mt-row { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 12px; border-radius: 10px; }
.mt-row:nth-child(even) { background: rgba(127, 127, 127, .05); }
.mt-row:hover { background: var(--accent-soft); }
.mt-row.is-newest { background: linear-gradient(90deg, rgba(245, 206, 98, .16), transparent 70%); }
.mt-row__link { flex: 1; min-width: 0; display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto; align-items: center; gap: 16px; min-height: 46px; color: inherit; }
.mt-row__link:hover { color: inherit; }
.mt-row__box { display: inline-grid; place-items: center; min-width: 46px; height: 32px; padding: 0 8px; border: 2px solid var(--text); border-radius: 3px; font-family: var(--font-head); font-size: 14px; font-weight: 700; }
.mt-row:hover .mt-row__box { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.mt-row.is-newest .mt-row__box { border-color: var(--hot); background: var(--hot); color: var(--hot-ink); }
.mt-row__name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.mt-row__team { max-width: 180px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-row__date { font-size: 13px; color: var(--muted); white-space: nowrap; }
.mt-row__new { margin-left: 8px; padding: 1px 6px; border-radius: 5px; background: var(--hot); color: var(--hot-ink); font-size: 10px; font-weight: 800; vertical-align: 1px; }
.mt-row.is-read .mt-row__box { opacity: .5; border-style: dashed; }
.mt-row.is-read .mt-row__name, .mt-row.is-read .mt-row__date, .mt-row.is-read .mt-row__team { opacity: .6; }
.mt-read { flex: none; }
.mt-read__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-btn); background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.mt-read__btn::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; box-sizing: border-box; }
.mt-read__btn--no:hover { color: var(--ok); border-color: var(--ok); }
.mt-read__btn--yes { color: var(--ok); border-color: rgba(63, 179, 127, .5); background: rgba(63, 179, 127, .12); }
.mt-read__btn--yes::before { background: currentColor; }
.mt-read__btn--yes:hover { color: var(--danger); border-color: var(--danger); background: transparent; }

/* ── 5. Оцінка (Multirating) ── */
.mt .multirating-wrapper { position: relative; margin: 0; padding: 0; border: 0; background: none; }
.mt .multirating-items-wrapper { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 0; }
.mt .multirating-item { display: grid; grid-template-columns: 60px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 8px; align-items: center; width: auto; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--surface); float: none; }
.mt .multirating-item-rateval { grid-row: 1 / 3; width: 60px; height: 60px; margin: 0; }
.mt .multirating-item-rateval canvas { display: block; width: 60px; height: 60px; }
.mt .multirating-item-title { margin: 0; font-size: 14px; font-weight: 700; text-align: left; color: var(--text); }
.mt .multirating-item-rating { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin: 0; padding: 0; list-style: none; }
.mt .multirating-item-rating li { width: auto; height: 14px; margin: 0; padding: 0; border-radius: 3px; background: var(--surface-2); font-size: 0; cursor: pointer; float: none; }
.mt .multirating-item-rating li.multirating-rate-active { background: var(--accent); }
.mt .multirating-rated .multirating-item-rating li { cursor: default; }
.mt .multirating-itog { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 16px 0 0; padding: 14px 16px; border-radius: 14px; background: linear-gradient(90deg, var(--accent-soft), transparent); font-size: 14px; color: var(--muted); text-align: left; }
.mt .multirating-itog b { font-family: var(--font-head); font-size: 26px; color: var(--hot); }
.mt .multirating-itog i { font-style: normal; }
.mt .multirating-itog a { color: var(--accent); font-weight: 600; }

/* ── 6. Коментарі (хмарки) ── */
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; }
.comments-list { display: flex; flex-direction: column; }

/* ═══ Назва + олівець «Редагувати» (лише редакторам) ═══ */
.mt-titlebar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.mt-titlebar .mt-title { flex: 1; min-width: 0; }
.mt-edit { flex: none; display: flex; gap: 6px; padding-top: 6px; }
.mt-edit:empty { display: none; }   /* кнопки немає — хто може редагувати, вирішують налаштування «Manga Команди» */
.mt-edit a { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 13px; font-weight: 600; }
.mt-edit a::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16z'/%3E%3C/svg%3E") center / contain no-repeat; }
.mt-edit a:hover { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* ═══ Панель дій: головні кнопки ліворуч, кнопки модулів праворуч — одна висота ═══ */
.mt-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 10px; padding: 10px; border-radius: 18px; background: var(--surface); }
.mt-actions__main { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 10px; }
.mt-actions__main:has(> :only-child), .mt-actions__main:has(> [data-read-last][hidden]) { grid-template-columns: minmax(0, 1fr); }
.mt-actions__main .mt-btn { justify-content: flex-start; min-height: 58px; }
.mt-actions__more { display: flex; gap: 8px; align-items: stretch; }
.mt-actions__more > * { display: flex; }
.mt-actions__more .mt-chipbtn,
.mt-actions__more .mt-lists .trigger,
.mt-actions__more .mt-lists .edit-trigger,
.mt-actions__more .mt-subscribe .subbutt { height: 100%; min-height: 58px; }
.mt-actions__more .mt-lists .trigger { display: flex; }
.mt-actions__more .mt-lists .edit-trigger { background: var(--surface-2); }
.mt-actions__more .expanded-options, .mt-actions__more .playlist-add-window { left: auto; right: 0; }

/* ═══ «У списках користувачів» — окремий рядок, сітка смужок ═══ */
.mt-lists-stat .mt-userlists { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 32px; }

@media (max-width: 1100px) {
  .mt-actions { grid-template-columns: minmax(0, 1fr); }
  .mt-actions__more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mt-actions__more .mt-chipbtn, .mt-actions__more .mt-lists .edit-trigger, .mt-actions__more .mt-subscribe .subbutt { width: 100%; justify-content: center; }
  .mt-actions__more .expanded-options, .mt-actions__more .playlist-add-window { left: 0; right: auto; }
}
@media (max-width: 560px) {
  .mt-actions__main { grid-template-columns: minmax(0, 1fr); }
  .mt-actions__main .mt-btn { justify-content: center; }
  .mt-actions__more .mt-chipbtn, .mt-actions__more .mt-lists .edit-trigger, .mt-actions__more .mt-subscribe .subbutt { flex-direction: column; gap: 4px; padding: 8px 4px; font-size: 12px; min-height: 64px; white-space: normal; text-align: center; line-height: 1.2; }
  .mt-actions__more .mt-lists .edit-trigger .text::after { display: none; }
  .mt-actions__more .mt-lists .edit-trigger .edit-trigger { flex-direction: column; }
}

/* ── Адаптивність ── */
@media (max-width: 1000px) {
  .mt-top { grid-template-columns: 200px minmax(0, 1fr); gap: 28px; }
  .mt-about { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 760px) {
  .mt-top { grid-template-columns: minmax(0, 1fr); }
  .mt-cover { width: 190px; }
  .mt-stat--prog { grid-column: 1 / -1; }
  .mt-row__link { grid-template-columns: 84px minmax(0, 1fr) auto; gap: 12px; }
  .mt-row__team { display: none; }
}
@media (max-width: 520px) {
  .mt-actions__main { flex-direction: column; }
  .mt-btn { justify-content: center; }
  .mt-actions__more > * { flex: 1 1 auto; }
  .mt-chipbtn, .mt-lists .edit-trigger, .mt-subscribe .subbutt { justify-content: center; width: 100%; }
  .mt-row__link { grid-template-columns: 70px minmax(0, 1fr); gap: 10px; }
  .mt-row__date { display: none; }
  .mt-read__btn { padding: 0 8px; font-size: 0; gap: 0; }
  .mt-read__btn::before { width: 16px; height: 16px; }
}

/* Кнопки дій: «Останній розділ» в один рядок; «До колекції» — як інші кнопки (старі стилі колекцій фарбували її в зелений) */
.mt-btn__text > span { white-space: nowrap; }
.mt-actions .mt-chipbtn.playlist-add-trigger { margin: 0; padding: 0 16px 0 14px; max-width: none; border-radius: var(--radius-btn); background: var(--surface-2); color: var(--text); }
.mt-actions .mt-chipbtn.playlist-add-trigger:hover { background: var(--accent-soft); color: var(--text); }

/* Розмитий постер за верхом сторінки (title.js додає .mt-backdrop) */
.mt-backdrop { position: absolute; z-index: -2; top: -28px; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .6s ease; -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent); mask-image: linear-gradient(180deg, #000 30%, transparent); }
.mt-backdrop.is-on { opacity: 1; }
.mt-backdrop img { position: absolute; inset: -60px; width: calc(100% + 120px); height: calc(100% + 120px); object-fit: cover; filter: blur(48px) saturate(1.4); opacity: .32; }
[data-theme="light"] .mt-backdrop img { opacity: .22; filter: blur(48px) saturate(1.2); }
.mt-top::before { z-index: -1; }
html[data-motion="off"] .mt-backdrop { transition: none; }

/* Заголовки розділів сторінки — простий жирний текст (плашка — лише в назви тайтлу) */
.mt-h { padding: 0; border-radius: 0; background: none; color: var(--text); font-size: 21px; letter-spacing: -.01em; transform: none; box-shadow: none; }
/* Тип — нейтральна плашка: блакитний лишається для «Читати» */
.mt-tag--type { background: var(--frame); color: var(--bg); }

/* ═══ Верх тайтлу, спрощено ═══ */
/* Показники + кнопки читання в одному рядку (перегляди й коментарі прибрано) */
.mt-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.mt-stats > .mt-stat { flex: 0 0 auto; min-width: 130px; }
.mt-stats > .mt-stat--prog { flex: 1.4 1 240px; }
.mt-stats > .mt-btn { flex: 1 1 190px; min-height: 0; padding: 12px 18px 12px 14px; border-radius: 14px; }
.mt-stats > .mt-btn[hidden] { display: none; }
.mt-stats > .mt-btn--outline { background: var(--surface); box-shadow: none; }
.mt-stats > .mt-btn--outline:hover { box-shadow: inset 0 0 0 2px var(--accent); }

/* Жанри — однотонні */
.mt-genres a, [data-theme="light"] .mt-genres a { padding: 6px 13px; border-radius: 999px; background: var(--surface-2); color: var(--text); filter: none; transition: background-color var(--t-fast, .22s) ease, color var(--t-fast, .22s) ease; }
.mt-genres a:hover, [data-theme="light"] .mt-genres a:hover { background: var(--accent-soft); color: var(--text); filter: none; }

/* Панель дій — без підкладки, компактні кнопки «Список» і «До колекції» */
.mt-actions { display: block; padding: 0; background: none; border-radius: 0; }
.mt-actions:not(:has(*)) { display: none; }
.mt-actions__more { display: flex; flex-wrap: wrap; gap: 8px; }
.mt-actions__more > * { display: flex; }
.mt-actions__more .mt-chipbtn,
.mt-actions__more .mt-lists .trigger,
.mt-actions__more .mt-lists .edit-trigger { height: auto; min-height: 40px; }
.mt-actions__more .mt-chipbtn, .mt-actions__more .mt-lists .edit-trigger,
.mt-actions .mt-chipbtn.playlist-add-trigger { padding: 0 14px 0 12px; border-radius: var(--radius-btn); background: var(--surface-2); font-size: 14px; }
.mt-actions__more .expanded-options, .mt-actions__more .playlist-add-window { left: 0; right: auto; }

/* Підписка — на постері, як у старому шаблоні */
.mt-cover .mt-subscribe { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 2; }
.mt-cover .mt-subscribe .subscribe-container { display: block; }
.mt-cover .mt-subscribe .subbutt {
  display: flex; justify-content: center; align-items: center; gap: 7px; width: 100%; min-height: 40px; padding: 0 12px;
  border-radius: 9px; background: rgba(14, 15, 19, .78); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  transition: background-color var(--t-fast, .22s) ease;
}
.mt-cover .mt-subscribe .subbutt:hover { background: var(--accent); color: var(--accent-ink); }
.mt-cover .mt-subscribe .subbutt.unsubscribe_from { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.mt-cover .mt-subscribe .subbutt.unsubscribe_from:hover { background: var(--danger); color: #fff; }
.mt-cover .mt-subscribe .subbuttext { white-space: nowrap; }

@media (max-width: 1100px) {
  .mt-actions__more { display: flex; }
  .mt-actions__more .mt-chipbtn, .mt-actions__more .mt-lists .edit-trigger { width: auto; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .mt-stats > .mt-btn { flex-basis: 100%; justify-content: center; min-height: 52px; }
  .mt-stats > .mt-stat { flex: 1 1 120px; }
  .mt-actions__more > * { flex: 1 1 0; }
  .mt-actions__more .mt-chipbtn, .mt-actions__more .mt-lists .edit-trigger { flex-direction: row; width: 100%; justify-content: center; min-height: 44px; font-size: 13px; padding: 0 10px; }
}
.mt-actions__more { flex-direction: row; align-items: stretch; }
.mt-actions__more > .mt-lists, .mt-actions__more > .playlist-add-area { flex: 0 0 auto; width: auto; margin: 0; }
.mt-actions__more .mt-lists .trigger, .mt-actions__more .mt-lists .edit-trigger { width: 100%; }
@media (max-width: 560px) {
  .mt-actions__more > .mt-lists, .mt-actions__more > .playlist-add-area { flex: 1 1 0; min-width: 0; }
  .mt-actions__more .mt-chipbtn { width: 100%; }
}

/* «Останній розділ» — скелетон, поки вантажаться розділи */
.mt-btn.is-loading { position: relative; overflow: hidden; pointer-events: none; }
.mt-btn.is-loading > * { visibility: hidden; }
.mt-btn.is-loading::before { content: ""; position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 6px; background: var(--surface-2); }
.mt-btn.is-loading::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(var(--surface-2), var(--surface-2)) 50px calc(50% - 8px) / 120px 11px no-repeat,
    linear-gradient(var(--surface-2), var(--surface-2)) 50px calc(50% + 9px) / 70px 9px no-repeat,
    linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent) -100% 0 / 60% 100% no-repeat;
  animation: mt-sk 1.4s ease-in-out infinite;
}
[data-theme="light"] .mt-btn.is-loading::after { background:
    linear-gradient(var(--surface-2), var(--surface-2)) 50px calc(50% - 8px) / 120px 11px no-repeat,
    linear-gradient(var(--surface-2), var(--surface-2)) 50px calc(50% + 9px) / 70px 9px no-repeat,
    linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent) -100% 0 / 60% 100% no-repeat; }
@keyframes mt-sk { to { background-position: 50px calc(50% - 8px), 50px calc(50% + 9px), 250% 0; } }
@media (prefers-reduced-motion: reduce) { .mt-btn.is-loading::after { animation: none; } }

/* ═══ Вікно «Додати до колекції» — у стилі шаблону (перекриває playlists/style.css) ═══ */
.mt-actions .playlist-add-window {
  top: calc(100% + 8px); left: 0; right: auto; width: 310px; max-width: calc(100vw - 32px); margin: 0; padding: 14px;
  border-radius: 12px; background: var(--surface); color: var(--text); border: 2px solid var(--line-strong);
  box-shadow: 6px 6px 0 var(--frame-shade), var(--shadow); z-index: 40;
}
.mt-actions .playlist-add-window h3 { margin: 0 0 10px; padding: 0; font-family: var(--font-head); font-size: 15px; font-weight: 700; line-height: 1.3; }
.mt-actions .playlist-add-window h3.pload { background-position: 100% 50%; }
.mt-actions .playlist-add-loading { height: 34px; line-height: 34px; color: var(--muted); font-size: 13px; }
.mt-actions input[type="text"].playlist-add-input {
  height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong); background-color: var(--surface-2);
  color: var(--text); font: inherit; font-size: 14px; box-shadow: none; transition: border-color var(--t-fast, .22s) ease;
}
.mt-actions input[type="text"].playlist-add-input:focus { border-color: var(--accent); box-shadow: none; }
.mt-actions input[type="text"].playlist-add-search {
  padding-left: 34px;
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa3b2' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px 50% / 16px;
}
.mt-actions input.playlist-add-input::placeholder { color: var(--muted); }
.mt-actions .playlist-add-list { margin: 8px -6px; padding: 0; max-height: 230px; overflow-y: auto; scrollbar-width: thin; }
.mt-actions .playlist-add-list li { position: relative; display: block; padding: 9px 10px 9px 38px; border-radius: 8px; color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color var(--t-fast, .22s) ease; }
.mt-actions .playlist-add-list li:hover { background: var(--surface-2); color: var(--text); }
.mt-actions .playlist-add-list li span { line-height: 1.35; }
.mt-actions .playlist-add-list li:hover span { transform: none; }
.mt-actions .playlist-add-list li i { display: none; }
.mt-actions .playlist-add-list li::before {
  top: 50%; left: 11px; width: 18px; height: 18px; margin-top: -9px; border-radius: 5px; border: 2px solid var(--line-strong);
  background: var(--surface-2); box-sizing: border-box; transition: background-color var(--t-fast, .22s) ease, border-color var(--t-fast, .22s) ease;
}
.mt-actions .playlist-add-list li.current::before {
  border-color: var(--accent);
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") no-repeat center / 12px;
}
.mt-actions .playlist-add-create-area { margin: 0 -14px -14px; padding: 6px; border-top: 1px solid var(--line); }
.mt-actions .playlist-add-create-area > a, .mt-actions a.playlist-button {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.3; background: none;
}
.mt-actions .playlist-add-create-area > a:hover, .mt-actions a.playlist-button:hover { background: var(--surface-2); color: var(--text); }
.mt-actions a.playlist-add-create-button { color: var(--accent); }
.mt-actions a.playlist-add-create-button::before { content: "+"; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: var(--accent-soft); font-size: 15px; font-weight: 700; line-height: 1; }
.mt-actions a.playlist-button::before { content: ""; width: 18px; height: 18px; background: currentColor; opacity: .7; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='13' rx='2'/%3E%3Cpath d='M6 5h12M9 2h6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='13' rx='2'/%3E%3Cpath d='M6 5h12M9 2h6'/%3E%3C/svg%3E") center / contain no-repeat; }
.mt-actions .playlist-add-create { padding: 6px 4px 4px; }
.mt-actions .playlist-add-create::after { content: ""; display: block; clear: both; }
.mt-actions .playlist-add-title { margin-bottom: 10px; }
.mt-actions .playlist-add-submit { float: right; height: 36px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.mt-actions .playlist-add-submit:hover { background: var(--accent); filter: brightness(1.1); }
.mt-actions .playlist-add-create > div { display: flex; align-items: center; gap: 8px; min-height: 36px; padding-top: 0 !important; }
.mt-actions .playlist-add-create .checkbox, .mt-actions .playlist-add-create .checkbox:not(checked) { position: static; opacity: 1; width: 18px; height: 18px; margin: 0; }
.mt-actions .playlist-add-create .checkbox + label { height: auto; padding: 0; font-size: 13px; color: var(--muted); line-height: 1.3; }
.mt-actions .playlist-add-create .checkbox + label::before, .mt-actions .playlist-add-create .checkbox + label::after { content: none; display: none; }
@media (max-width: 560px) { .mt-actions .playlist-add-window { left: auto; right: 0; } }

/* «Додати розділ» біля списків і колекцій; посилання автора на редагування — з підписом */
.mt-chipbtn--addch { --ico: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); text-decoration: none; }
.mt-actions__more .mt-chipbtn--addch { min-height: 40px; padding: 0 14px 0 12px; border-radius: var(--radius-btn); background: var(--surface-2); color: var(--text); font-size: 14px; }
.mt-actions__more .mt-chipbtn--addch:hover { background: var(--accent-soft); color: var(--text); }
.mt-edit a .icon { display: none; }
.mt-edit a[href*="/editmanga/"]::after { content: "Редагувати манґу"; }
.mt-edit a[href*="/editchapter/"]::after { content: "Редагувати розділ"; }
@media (max-width: 560px) { .mt-actions__more { flex-wrap: wrap; } .mt-actions__more > .mt-chipbtn--addch { flex: 1 1 100%; justify-content: center; } }

/* ═══ Сторінка тайтлу на телефоні: постер ліворуч від назви, а не на пів екрана ═══ */
@media (max-width: 1100px) and (min-width: 761px) { .mt-top { grid-template-columns: 210px minmax(0, 1fr); gap: 30px; } }
@media (max-width: 760px) {
  .mt-top { grid-template-columns: 150px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 18px; row-gap: 14px; }
  .mt-info { display: contents; }
  .mt-cover { width: auto; grid-row: span 3; align-self: start; border-width: 2px; box-shadow: 5px 5px 0 var(--frame); }
  .mt-titlebar, .mt-alt, .mt-tags-row { grid-column: 2; }
  .mt-info > :not(.mt-titlebar):not(.mt-alt):not(.mt-tags-row) { grid-column: 1 / -1; }
  .mt-title { font-size: 26px; }
  .mt-alt { margin: -8px 0 0; font-size: 14px; }
  .mt-tags-row { align-self: start; gap: 6px; }
  .mt-tags-row .mt-tag { font-size: 12px; }
  .mt-cover .mt-subscribe { left: 6px; right: 6px; bottom: 6px; }
  .mt-cover .mt-subscribe .subbutt { min-height: 34px; padding: 0 8px; gap: 6px; font-size: 12px; }
  .mt-cover .mt-subscribe .subbutt::before { width: 15px; height: 15px; }
}
@media (max-width: 420px) {
  .mt-top { grid-template-columns: 124px minmax(0, 1fr); column-gap: 14px; }
  .mt-title { font-size: 22px; }
}


/* ═══ Розділи v2: томи-картки (згортаються), альтернативні переклади під основним, коментарі ═══ */
.mt-chapters { display: flex; flex-direction: column; gap: 10px; }
.mt-volbox { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.mt-volbox.is-open { border-color: var(--line-strong); }
.mt-vol { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0; padding: 12px 16px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: background-color .15s ease; }
.mt-vol:hover { background: var(--surface-2); }
.mt-vol:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.mt-volbox .mt-vol__spine { flex: none; width: 34px; height: 46px; }
.mt-vol__info { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 2px; }
.mt-vol__label { font-family: var(--font-head); font-size: 16px; font-weight: 700; }
.mt-vol__range { color: var(--muted); font-size: 13px; }
.mt-volbox .mt-vol__count { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; }
.mt-vol__prog { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; min-width: 92px; color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mt-vol__bar { width: 92px; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.mt-vol__bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.mt-vol__prog.is-done { color: var(--ok); }
.mt-vol__prog.is-done .mt-vol__bar span { background: var(--ok); }
.mt-vol__chev { flex: none; width: 9px; height: 9px; margin: 0 4px 4px 2px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s ease; }
.mt-vol[aria-expanded="true"] .mt-vol__chev { transform: translateY(3px) rotate(-135deg); }
.mt-vol__body { padding: 2px 8px 10px; border-top: 1px solid var(--line); }
.mt-vol__body[hidden] { display: none; }
.mt-chapters > .mt-vol__body { padding: 0; border: 0; }

/* рядок розділу */
.mt-vol__body .mt-row:nth-child(even) { background: none; }
.mt-row { margin-top: 2px; }
.mt-row__link { grid-template-columns: 96px minmax(0, 1fr) auto; }
.mt-row__main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.mt-row__main .mt-row__name { flex: 1; color: var(--text); }
.mt-row__name.is-plain { color: var(--muted); }
.mt-row__sub { display: flex; align-items: center; gap: 16px; flex: none; }
.mt-row__cm { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.mt-row__cm::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.5 8.5 0 0 1-12.3 7.6L3 21l1.9-5.2A8.5 8.5 0 1 1 21 11.5z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.5 8.5 0 0 1-12.3 7.6L3 21l1.9-5.2A8.5 8.5 0 1 1 21 11.5z'/%3E%3C/svg%3E") center / contain no-repeat; }
/* альтернативний переклад — під основним, з відступом */
.mt-row.is-alt { margin-top: -2px; }
.mt-row.is-alt .mt-row__link { min-height: 38px; }
.mt-row__alt { display: inline-grid; place-items: center; min-width: 46px; color: var(--accent); font-size: 18px; font-weight: 700; }
.mt-row.is-alt .mt-row__name { color: var(--muted); font-size: 13px; font-style: italic; }
.mt-row.is-alt .mt-row__team { color: var(--accent); }

@media (max-width: 760px) {
  .mt-vol { gap: 12px; padding: 10px 12px; }
  .mt-vol__prog { min-width: 64px; }
  .mt-vol__bar { width: 64px; }
  .mt-vol__body { padding: 2px 4px 8px; }
  .mt-row__link { grid-template-columns: 62px minmax(0, 1fr) auto; gap: 10px; }
  .mt-row__main { flex-direction: column; align-items: flex-start; gap: 2px; }
  .mt-row__main .mt-row__name { flex: none; max-width: 100%; }
  .mt-row__sub { gap: 10px; font-size: 12px; }
  .mt-row__sub .mt-row__team { display: inline; max-width: 150px; }
  .mt-row__sub .mt-row__date { display: inline; }
}
.mt-chapters > * { flex: none; }
.mt-chapters:has(> .mt-volbox) { max-height: none; overflow: visible; }
.mt-ch-tools .mt-link-btn { white-space: nowrap; }
@media (max-width: 760px) { .mt-ch-tools { flex-wrap: wrap; gap: 8px 14px; } }

/* Наведення: виділяти кожен рядок (правило про смуги в томах перебивало :hover на парних) */
.mt-vol__body .mt-row:hover, .mt-chapters .mt-row:hover { background: var(--accent-soft); }
/* Рядок: назва | коментарі · перекладач · дата | «прочитано» — колонки однакової ширини, щоб усе стояло рівно */
.mt-row__link { grid-template-columns: 96px minmax(0, 1fr); }
.mt-row__sub { display: grid; grid-template-columns: 52px 170px 86px; align-items: center; gap: 14px; flex: none; }
.mt-row__cm { justify-content: flex-end; }
.mt-row__cm:empty::before { content: none; }
.mt-row__sub .mt-row__team { max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.mt-row__sub .mt-row__date { text-align: right; }
@media (max-width: 1100px) { .mt-row__sub { grid-template-columns: 44px 130px 82px; } }
@media (max-width: 760px) {
  .mt-row__link { grid-template-columns: 62px minmax(0, 1fr); }
  .mt-row__sub { display: flex; gap: 10px; }
  .mt-row__cm { order: 0; }
  .mt-row__cm:empty { display: none; }
  .mt-row__sub .mt-row__team { text-align: left; max-width: 150px; }
}

/* ═══ Плитка «Оцінка читачів»: та сама оцінка, що в блоці оцінювання (MgRating), зірка, голоси, шкала; клік — до оцінювання ═══ */
.mt-stats > .mt-stat--score { min-width: 160px; color: inherit; text-decoration: none; transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease; }
a.mt-stat--score:hover { color: inherit; box-shadow: inset 0 0 0 2px var(--hot); transform: translateY(-1px); }
.mt-stat--score .mt-stat__val::before { content: none; }
.mt-stat--score .mt-stat__val { display: flex; align-items: center; gap: 6px; font-size: 26px; color: var(--hot); }
.mt-stat--score .mt-stat__val small { margin-left: 1px; font-size: 14px; }
.mt-score__star { width: 22px; height: 22px; flex: none; fill: currentColor; }
.mt-score__votes { font-size: 12px; color: var(--muted); }
.mt-stat--score .mt-stat__label { color: var(--text); font-weight: 600; }
.mt-score__bar { height: 4px; margin-top: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.mt-score__bar span { display: block; height: 100%; border-radius: inherit; background: var(--hot); }
.mt-stat--score.is-mid .mt-stat__val, .mt-stat--score.is-mid .mt-score__bar span { color: var(--warn); background-color: transparent; }
.mt-stat--score.is-mid .mt-score__bar span { background: var(--warn); }
.mt-stat--score.is-lo .mt-stat__val { color: var(--muted); }
.mt-stat--score.is-lo .mt-score__bar span { background: var(--muted); }
.mt-stat--score.is-empty .mt-stat__val { color: var(--muted); }
.mt-stat--score.is-empty .mt-score__votes { color: var(--accent); font-weight: 600; }

/* ═══ Співредактори: «Запропонувати правку» / «Продовжую переклад» (engine/modules/mgeditors/box.php) ═══ */
.mt-help { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; padding-top: 6px; }
.mt-help__btn { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--radius-btn); background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: color .15s, box-shadow .15s; }
.mt-help__btn::before { content: ""; width: 14px; height: 14px; flex: none; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
a.mt-help__btn:hover, button.mt-help__btn:hover, .mt-help__btn[aria-expanded="true"] { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mt-help__btn--suggest { --ico: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3Cpath d='M8 9h8M8 13h5'/%3E%3C/svg%3E"); }
.mt-help__btn--req { --ico: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M19 8v6M22 11h-6'/%3E%3C/svg%3E"); }
.mt-help__btn--req.is-sent { --ico: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); color: var(--warn); box-shadow: inset 0 0 0 1px rgba(245, 165, 36, .4); cursor: default; }
.mt-req { position: relative; display: flex; }
.mt-req__pop { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: min(340px, calc(100vw - 32px)); padding: 16px; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 18px 40px -12px rgba(0, 0, 0, .55); }
.mt-req__pop[hidden] { display: none; }
.mt-req__title { display: block; margin-bottom: 4px; font-family: var(--font-head); font-size: 16px; }
.mt-req__text { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.mt-req__pop textarea { display: block; width: 100%; min-height: 76px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; resize: vertical; }
.mt-req__pop textarea:focus { outline: none; border-color: var(--accent); }
.mt-req__row { display: flex; gap: 8px; margin-top: 10px; }
.mt-req__row .btn { flex: 1; justify-content: center; }
.mt-req__msg { margin: 10px 0 0; font-size: 13px; color: var(--danger); }
.mt-req__msg.is-ok { color: var(--ok); }
@media (max-width: 760px) {
  .mt-titlebar { flex-wrap: wrap; }
  .mt-help { flex: 1 1 100%; min-width: 0; justify-content: flex-start; padding-top: 0; }
  .mt-help__btn { min-height: 32px; padding: 0 10px; font-size: 12px; }
  .mt-req { position: static; }
  /* вікно запиту — знизу на всю ширину, над нижнім меню */
  .mt-req__pop { position: fixed; top: auto; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); left: 12px; width: auto; }
}

/* довгі назви — менший шрифт (клас ставить title.js за довжиною), щоб кнопки «Читати» лишались на першому екрані */
.mt-title--long { font-size: clamp(24px, 2.8vw, 36px); line-height: 1.12; }
.mt-title--xl { font-size: clamp(20px, 2.2vw, 30px); line-height: 1.15; }
@media (max-width: 760px) { .mt-title--long { font-size: 20px; } .mt-title--xl { font-size: 18px; } }

/* Лічильник у заголовку секції («Коментарі 7») — бейдж */
.mt-h .mt-count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; margin-left: 8px; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-family: var(--font); font-size: 13px; font-weight: 800; line-height: 1; vertical-align: 3px; opacity: 1; font-variant-numeric: tabular-nums; }
.mt-h .mt-count:empty { display: none; }

/* ═══ Розділи: компактні рядки; дані (коментарі · перекладач · дата) одразу після назви, а не на іншому краю ═══ */
.mt-row__link { min-height: 40px; gap: 12px; grid-template-columns: 64px minmax(0, 1fr); }
.mt-row__box { min-width: 38px; height: 26px; padding: 0 6px; border-width: 1.5px; font-size: 13px; }
.mt-row__main { justify-content: flex-start; gap: 18px; }
.mt-row__main .mt-row__name { flex: 0 1 auto; }
.mt-row__sub { display: flex; align-items: center; gap: 14px; }
.mt-row__sub .mt-row__team { max-width: 220px; text-align: left; }
.mt-row__cm:empty { display: none; }
/* «Розділ N» без власної назви — номер у рамці зайвий: лише текст */
.mt-row__link:has(.mt-row__name.is-plain) { display: flex; align-items: center; }
.mt-row__link:has(.mt-row__name.is-plain) .mt-row__box { display: none; }
.mt-row__link:has(.mt-row__name.is-plain) .mt-row__num:not(:has(.mt-row__new)) { display: none; }
.mt-row__link:has(.mt-row__name.is-plain) .mt-row__num { order: 2; }
.mt-row__link:has(.mt-row__name.is-plain) .mt-row__new { margin-left: 0; }
.mt-row__name.is-plain { color: var(--text); font-weight: 600; }
.mt-row.is-newest .mt-row__name.is-plain { color: var(--hot, var(--text)); }
.mt-row:hover .mt-row__name.is-plain { color: var(--accent); }
@media (max-width: 760px) {
  .mt-row__link { grid-template-columns: 52px minmax(0, 1fr); min-height: 48px; }
  .mt-row__main { flex-direction: column; align-items: flex-start; gap: 2px; }
  .mt-row__sub { gap: 10px; font-size: 12px; }
}

/* ═══ Телефон: «Читати» та «Останній розділ» в один ряд ═══ */
@media (max-width: 760px) {
  .mt-actions__main { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 8px; }
  .mt-actions__main:has(> :only-child), .mt-actions__main:has(> [data-read-last][hidden]) { grid-template-columns: minmax(0, 1fr); }
  .mt-actions__main .mt-btn { min-height: 54px; padding: 0 12px; gap: 8px; justify-content: flex-start; }
  .mt-actions__main .mt-btn__text { min-width: 0; }
  .mt-actions__main .mt-btn__text > span, .mt-actions__main .mt-btn__text small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mt-actions__main .mt-btn__text > span { font-size: 15px; }
  .mt-actions__main .mt-btn__ico { flex: none; }
}
/* Кнопки в шапці тайтлу (.mt-stats > .mt-btn) на телефоні — поруч: «Читати» ширша */
@media (max-width: 760px) {
  .mt-stats > .mt-stat { flex: 1 1 calc(50% - 5px); }
  .mt-stats > .mt-btn { flex: 1 1 calc(40% - 5px); min-width: 0; justify-content: flex-start; min-height: 54px; padding: 8px 12px; gap: 8px; }
  .mt-stats > .mt-btn { padding: 8px 10px; gap: 6px; }
  .mt-stats > .mt-btn .mt-btn__text > span { font-size: 14px; }
  .mt-stats > .mt-btn .mt-btn__text { min-width: 0; }
  .mt-stats > .mt-btn .mt-btn__text > span, .mt-stats > .mt-btn .mt-btn__text small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mt-stats > .mt-btn .mt-btn__ico { flex: none; }
}

/* ═══ ПК: коментарі · перекладач · дата — праворуч, перед позначкою «прочитано» ═══ */
@media (min-width: 761px) {
  .mt-row__main { flex: 1; }
  .mt-row__main .mt-row__name { flex: 1 1 auto; }
  .mt-row__sub { margin-left: auto; display: grid; grid-template-columns: 48px 170px 86px; gap: 14px; }
  .mt-row__cm:empty { display: block; }
  .mt-row__cm { justify-content: flex-end; }
  .mt-row__sub .mt-row__team, .mt-row__sub .mt-row__date { text-align: right; }
  .mt-row__link:has(.mt-row__name.is-plain) .mt-row__main { flex: 1; }
}
@media (min-width: 761px) and (max-width: 1100px) { .mt-row__sub { grid-template-columns: 44px 130px 82px; } }

/* ── Розділи: помітна шапка (іконка + лінія) і легке чергування рядків — щоб було видно, де починається список ── */
#chapters .mt-sec__head { padding-bottom: 12px; border-bottom: 2px solid var(--line-strong); }
#chapters .mt-h { display: inline-flex; align-items: center; gap: 10px; }
#chapters .mt-h::before { content: ""; flex: none; width: 26px; height: 26px; border-radius: 6px; background: var(--accent) no-repeat center / 16px; background-image: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5A1.5 1.5 0 0 1 5.5 4H11v16H5.5A1.5 1.5 0 0 1 4 18.5zM13 4h5.5A1.5 1.5 0 0 1 20 5.5v13a1.5 1.5 0 0 1-1.5 1.5H13z'/%3E%3C/svg%3E"); }
#chapters .mt-vol__body > .mt-row:nth-child(even):not(.is-newest) { background: color-mix(in srgb, var(--surface) 70%, transparent); }
#chapters .mt-vol__body > .mt-row:nth-child(even):not(.is-newest):hover { background: var(--accent-soft); }
#chapters .mt-chapters > .mt-vol__body { padding: 0; border-top: 0; }

/* ── Статус перекладу в мітці: «Переклад: Триває» (щоб не плутати зі статусом оригіналу в «Інформації») ── */
.mt-tag__k { color: var(--muted); font-weight: 500; margin-right: -3px; }
/* ── Рядок розділу: «Розділ N · назва» — однаково для всіх розділів ── */
.mt-row__title { color: var(--muted); font-weight: 500; }
.mt-row.is-read .mt-row__title { opacity: .8; }
/* ── Гостям — ті самі дії під кнопками (відкривають вхід) ── */
.mt-chipbtn--list { --ico: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M6 3h12v18l-6-4-6 4z'/%3E%3C/svg%3E"); }
.mt-chipbtn--bell { --ico: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 1 1 12 0c0 7 3 9 3 9H3s3-2 3-9'/%3E%3Cpath d='M10 21a2 2 0 0 0 4 0'/%3E%3C/svg%3E"); }
.mt-actions__more--guest .mt-chipbtn { min-height: 40px; padding: 0 14px 0 12px; border-radius: var(--radius-btn); background: var(--surface-2); font-size: 14px; }
@media (max-width: 560px) { .mt-actions__more--guest { flex-wrap: wrap; } .mt-actions__more--guest > .mt-chipbtn { flex: 1 1 auto; justify-content: center; } }

/* ═══ Перенесено з playlists/style.css (вікно «До колекції»): лише правила playlist-add-* і favorite-icon-*.
   Раніше цілий файл (~32 КБ) вантажився на сторінці тайтлу; стоїть у кінці — як і раніше йшов після title.css ═══ */
.favorite-icon-active { position: absolute; cursor: pointer; font-size: 1.5em; right: 5px; top: 6px; display: block; color: #dddddd; }
.favorite-icon-inactive { position: absolute; cursor: pointer; font-size: 1.5em; right: 5px; top: 6px; display: block; color: #dddddd; }
.playlist-add-area { position: relative; width: calc(100% / 4); display: inline-table; }
.playlist-add-create *, .playlist-add-area * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; list-style: none; }
.playlist-add-trigger { color: #fff; padding: 7px 14px; margin-bottom: 10px; border-radius: 3px; cursor: pointer; background: #6bb96bd9; max-width: 260px; }
@media screen and (max-width: 1300px) { .playlist-add-area { width: 100%; } .playlist-add-trigger { max-width: none; } }
.playlist-add-window { position: absolute; top: 90%; right: 0px; margin-top: 4px; width: 261px; border: 1px solid #d2d2d2; box-shadow: 0 1px 5px rgba(0, 0, 0, .15); border-radius: 5px; padding: 0 15px; background: #fff; color: #222; display: none; z-index: 666; }
.playlist-add-window h3 { margin: 0; padding: 0; font-size: 100%; line-height: 45px; font-weight: normal; }
.playlist-add-window h3.pload { background: url(data:image/gif;base64,R0lGODlhFAAUAJEDAMzMzLOzs39/f////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgADACwAAAAAFAAUAAACPJyPqcuNItyCUJoQBo0ANIxpXOctYHaQpYkiHfM2cUrCNT0nqr4uudsz/IC5na/2Mh4Hu+HR6YBaplRDAQAh+QQFCgADACwEAAIADAAGAAACFpwdcYupC8BwSogR46xWZHl0l8ZYQwEAIfkEBQoAAwAsCAACAAoACgAAAhccMKl2uHxGCCvO+eTNmishcCCYjWEZFgAh+QQFCgADACwMAAQABgAMAAACFxwweaebhl4K4VE6r61DiOd5SfiN5VAAACH5BAUKAAMALAgACAAKAAoAAAIYnD8AeKqcHIwwhGntEWLkO3CcB4biNEIFACH5BAUKAAMALAQADAAMAAYAAAIWnDSpAHa4GHgohCHbGdbipnBdSHphAQAh+QQFCgADACwCAAgACgAKAAACF5w0qXa4fF6KUoVQ75UaA7Bs3yeNYAkWACH5BAUKAAMALAIABAAGAAwAAAIXnCU2iMfaRghqTmMp1moAoHyfIYIkWAAAOw==) no-repeat 100% 50%; }
.playlist-add-loading { background: url(data:image/gif;base64,R0lGODlhFAAUAJEDAMzMzLOzs39/f////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgADACwAAAAAFAAUAAACPJyPqcuNItyCUJoQBo0ANIxpXOctYHaQpYkiHfM2cUrCNT0nqr4uudsz/IC5na/2Mh4Hu+HR6YBaplRDAQAh+QQFCgADACwEAAIADAAGAAACFpwdcYupC8BwSogR46xWZHl0l8ZYQwEAIfkEBQoAAwAsCAACAAoACgAAAhccMKl2uHxGCCvO+eTNmishcCCYjWEZFgAh+QQFCgADACwMAAQABgAMAAACFxwweaebhl4K4VE6r61DiOd5SfiN5VAAACH5BAUKAAMALAgACAAKAAoAAAIYnD8AeKqcHIwwhGntEWLkO3CcB4biNEIFACH5BAUKAAMALAQADAAMAAYAAAIWnDSpAHa4GHgohCHbGdbipnBdSHphAQAh+QQFCgADACwCAAgACgAKAAACF5w0qXa4fF6KUoVQ75UaA7Bs3yeNYAkWACH5BAUKAAMALAIABAAGAAwAAAIXnCU2iMfaRghqTmMp1moAoHyfIYIkWAAAOw==) no-repeat 0 50%; height: 38px; line-height: 38px; padding-left: 22px; color: #000; }
input[type="text"].playlist-add-input { display: block; width: 100%; height: 28px; border: 1px solid #d3d3d3; border-radius: 5px; outline: none; }
input[type="text"].playlist-add-search { padding: 0 0 0 21px; background: #fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAO5JREFUeNqEj7sKwkAQRXe3tUivFv6Bla3YC/5JHvhAOxNEkFR52Nta2voFtpIfsLPRYGGdxHtDCEsQHdidZOfMvTNSIOI4bmdZtlVKTfI8N5ATZN9xnKPQQhEsiuIC4Incl1K2cJaoeVEUrXRYBkFwIGhZ1kIvVG4JagPUbqUyraEYikaYpnmHwwmf43oMzoj8EF8CMEczapjL4AybICCJNELDVVf2MdueM+og/rlDN03Tc+3Ei1ujac4ZaU1FgjgdNHq2bbulMi9su+PWtETxjacNFHsE8bYOw9CtlX8FQTagcfYXrhqmcH59BBgA7Rt1fTz8b80AAAAASUVORK5CYII=) no-repeat 5px 50%; }
input[type="text"].playlist-add-input:focus { border-color: #167ac6; box-shadow: inset 0 0 1px #f8f8f8; }
.playlist-add-list { list-style: none; margin: 15px -15px 10px; padding: 0; overflow: auto; max-height: 250px; }
.playlist-add-list li { padding: 0 35px; cursor: pointer; position: relative; }
.playlist-add-list li span { display: block; line-height: 25px; width: 100%; overflow: hidden; white-space: nowrap; word-wrap: normal; -o-text-overflow: ellipsis; text-overflow: ellipsis; }
.playlist-add-list li i { position: absolute; top: 7px; right: 15px; width: 8px; height: 12px; content: ""; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAMBAMAAACtsOGuAAAALVBMVEVHcEy3t7e3t7e3t7e3t7e3t7e3t7e3t7e3t7e3t7e3t7e3t7e3t7e3t7e3t7dH9PxeAAAADnRSTlMANpO05sVtZHZE8QsH5K992TUAAAAxSURBVAjXY+DWvbSBgfnVOgMGOZvDDxnqJnA+Z8gTYHzGEKfR9JThHRBgJfzevXsCAC9QIHo9Y9xuAAAAAElFTkSuQmCC); }
.playlist-add-list li:before { position: absolute; top: 6px; left: 15px; content: ""; width: 15px; height: 13px; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAALUlEQVQoU2O8e/fufwYSASNIk7KyMiOx+kDqRzUxMDCMBgQ0ycADgtgkBFMHABL9Wqz0z92sAAAAAElFTkSuQmCC); background-repeat: no-repeat; }
.playlist-add-list li.current:before { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAANCAMAAABBwMRzAAAAUVBMVEVHcEzl5eX29vaNjY3d3d18fHzl5eXl5eXl5eX29vbKysqWlpb29vb29vbt7e329vb29vbT09Pd3d1zc3N8fHyNjY3V1dV6enqFhYVkZGSoqKhB5H9/AAAAEnRSTlMAgzb9/Pnd1suI3f1wX8SMYuedhY4BAAAAWUlEQVQI103M0RJAMAxE0UVpATRJ4f8/FKrR+3ZmZxZeMybICQ9t2Ugyz3LI8LsV2kaoCyYJUFumqvSv9xVoamKHaKG+Y2KLz/cRPWsypriqYXeH3KnXecAFvmQGhBJ+cVEAAAAASUVORK5CYII=); }
.playlist-add-list li:hover { background: #eee; color: #000; }
.playlist-add-create-area { margin: 0 -15px; padding: 10px 0; border-top: 1px solid #ccc; }
.playlist-add-create-area>a { display: block; color: #222; text-decoration: none; padding: 0 15px; line-height: 25px; }
.playlist-add-create-area>a:hover { background: #eee; }
.playlist-add-create { display: none; padding: 5px 15px; }
.playlist-add-title { padding: 0 10px; margin-bottom: 17px; }
textarea.playlist-add-descr { height: 92px; padding:5px 10px; font:normal 12px/20px; border-radius:5px; margin-bottom: 6px; resize: none; }
.playlist-add-create .checkbox { vertical-align: top; margin: 1px 3px 0 0; width: 17px; height: 17px; }
.playlist-add-create .checkbox + label { display: inline-block; height: 20px; line-height: 20px; position: relative; padding-left: 45px; cursor: pointer; margin: 0; }
.playlist-add-create .checkbox + label:before { width: 40px; height: 100%; border-radius: 10px; background: #a3a4a6 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAUCAIAAADDbMD2AAAAFklEQVQImWOYNn0mEwMDAxMzMzM1aACclwI+prSwlgAAAABJRU5ErkJggg==) repeat-x; box-shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.7); position: absolute; top: 0; left: 0; content: ""; }
.playlist-add-create .checkbox:checked + label:before { background: #48aff2 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAUCAIAAADDbMD2AAAAIElEQVQImWNwX/2WiYGBgYmRkZGJgYGBiYmJCS9NQB0AnmQCNo0QJSsAAAAASUVORK5CYII=) repeat-x; }
.playlist-add-create .checkbox:not(checked) { position: absolute; opacity: 0; }
.playlist-add-create .checkbox:not(checked) + label:after { content: ""; display: block; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #eff3f6 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAQCAIAAABY/YLgAAAAJElEQVQImWP49ecfEwMDA9O/f/+ZGBgYmP7/h9D//qPycYgDAC4oF/p2KM+/AAAAAElFTkSuQmCC) repeat-x; border-radius: 50%; transition: all .2s ease; }
.playlist-add-create .checkbox:checked + label:after { left: 22px; }
.playlist-add-create .checkbox:not(checked) + label:hover:after { transform: translateX(4px); }
.playlist-add-create .checkbox:checked + label:hover:after { transform: translateX(-4px); }
.playlist-add-submit { float: right; background: #48aff2; color: #fff; height: 28px; border: none; border-radius: 5px; padding: 0 15px; cursor: pointer; }
.playlist-add-submit:hover { background: #42a0df; }
.playlist-add-list li:hover span { transform: translate3d(10px, 0, 0); transition: all .3s ease; }

/* шапка тайтлу — над розділами нижче: інакше випадаючі «До колекції» / списки просвічували текстом опису */
.mt-top { z-index: 2; }

/* Анонс запланованих розділів («Скоро вийде») */
.mt-soon { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 16px; padding: 12px 16px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.mt-soon svg { flex: none; width: 22px; height: 22px; margin-top: 2px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mt-soon__label { display: block; margin-bottom: 2px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.mt-soon ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.mt-soon li { font-size: 15px; }
.mt-soon time { color: var(--text); font-weight: 600; }

/* «Додати розділ» у шапці списку розділів (engine/modules/mgeditors/addbtn.php) — лише тим, хто може додати розділ */
.mt-addch { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--radius-btn, 10px); background: var(--accent); color: var(--accent-ink, #fff); font-size: 13px; font-weight: 700; white-space: nowrap; transition: filter .15s ease; }
.mt-addch:hover { color: var(--accent-ink, #fff); filter: brightness(1.08); }
.mt-addch svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }

/* «У списках користувачів» на телефоні: два стовпчики — назва й число в рядок, під ними тонка смужка */
@media (max-width: 640px) {
  .mt-lists-stat .mt-userlists { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
  .mt-lists-stat .mt-userlists .line { position: relative; grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .mt-lists-stat .mt-userlists .x_label { padding-right: 44px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mt-lists-stat .mt-userlists .bar-container { height: 6px; border-radius: 3px; }
  .mt-lists-stat .mt-userlists .bar { position: static; min-width: 6px; border-radius: 3px; }
  .mt-lists-stat .mt-userlists .value { top: 0; right: 0; transform: none; color: var(--text); font-size: 13px; line-height: 1.5; text-shadow: none; font-variant-numeric: tabular-nums; }
}

/* ═══ Ваш прогрес читання (плитка в шапці тайтлу) і «Усе прочитано» ═══ */
.mt-stat[hidden] { display: none !important; }
.mt-stats > .mt-stat--mine { flex: 1 1 200px; color: inherit; text-decoration: none; transition: box-shadow .15s ease, transform .15s ease; }
a.mt-stat--mine:hover { color: inherit; box-shadow: inset 0 0 0 2px var(--accent); transform: translateY(-1px); }
.mt-stat--mine .mt-stat__label { color: var(--text); font-weight: 600; }
.mt-stat--mine.is-done .mt-stat__val, .mt-stat--mine.is-done .mt-stat__label { color: var(--ok); }
.mt-stat--mine.is-done .mt-stat__bar span { background: var(--ok); }
.mt-btn.is-done, .mt-btn.is-done:hover { background: var(--surface); color: var(--ok); box-shadow: inset 0 0 0 2px var(--ok); transform: none; cursor: default; }
.mt-btn--primary.is-done .mt-btn__ico { background: rgba(63, 179, 127, .16); }
/* Прогрес читання всередині кнопки «Продовжити» (зареєстровані) */
.mt-btn.has-prog { position: relative; overflow: hidden; }
.mt-btn__prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0, 0, 0, .18); pointer-events: none; }
.mt-btn__prog[hidden] { display: none; }
.mt-btn__prog > span { display: block; height: 100%; width: 0; background: rgba(255, 255, 255, .85); border-radius: 0 3px 3px 0; transition: width .6s ease; }
.mt-btn.is-done .mt-btn__prog { background: rgba(63, 179, 127, .18); }
.mt-btn.is-done .mt-btn__prog > span { background: var(--ok); }
/* Телефон: назва — на весь рядок, «Редагувати манґу» і співредактори — під нею (не налазять на довгі слова) */
@media (max-width: 760px) {
  .mt-titlebar { flex-wrap: wrap; row-gap: 8px; }
  .mt-titlebar .mt-title { flex: 1 1 100%; overflow-wrap: break-word; }
  .mt-edit { padding-top: 0; }
  .mt-edit a { min-height: 32px; padding: 0 10px; font-size: 12px; }
}
