/* eroflick — общая основа всех страниц (дизайн: вариант A «Классика», макет https://claude.ai/artifact/KDiDcMFCgWKQTBUM55QvdL).
   Тема: <html data-theme="dark|light"> ставит скрипт в <head> (выбор пользователя или настройка устройства). */

/* Шрифты — свои, не Google Fonts (скорость 2026-10-06: их CSS блокировал отрисовку ~2 с, LCP на телефоне 5.2 с). Файлы — те же,
   что отдавал Google (переменные woff2, наборы latin и latin-ext; кириллица и CJK — системные, как и было). Начертания — как
   у Google: Syne 600–800, DM Sans 400/500 и 700 (600 рисуется как 700 — так выглядел утверждённый макет). Новая версия файла —
   новое имя (кеш 30 дней), и поправить preload в layout.php. */
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 600 800; font-display: swap; src: url(fonts/syne-v24-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 600 800; font-display: swap; src: url(fonts/syne-v24-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(fonts/dmsans-v17-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(fonts/dmsans-v17-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/dmsans-v17-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/dmsans-v17-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root, :root[data-theme="dark"] {
  --bg: #0A0710; --head: #0C0816; --surface: #120D21; --surface2: #16102A; --chip: #18112C; --card2: #1A1030;
  --line: #1E1630; --line2: #241A3C; --line3: #2B2042;
  --tx: #F4EFFA; --tx2: #C8BCDC; --tx3: #9C8FB4; --tx4: #8A7CA3; --lab: #877AA0; --mute: #85799D;
  --acc: #FF2E63; --acc-hi: #FF6B93; --acc-soft: #FF9CB6; --acc-bg: rgba(255,46,99,.16); --acc-line: rgba(255,46,99,.5); --on-acc: #0A0710; --acc-ink: #FF2E63;
  --vio: #8F5BFF; --teal: #2BD9C4; --amber: #FFB03A;
  --shadow: 0 30px 80px rgba(255,46,99,.14);
  --dsp: 'Syne', 'Trebuchet MS', sans-serif;
  --body: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --nav-h: 64px; --head-h: 64px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #FBF8FF; --head: #FFFFFF; --surface: #FFFFFF; --surface2: #F3EEFB; --chip: #F1EBFA; --card2: #FFF1F5;
  --line: #ECE6F5; --line2: #DCD3EA; --line3: #CBC0DD;   /* line3 — заметнее line2: рамки кнопок шапки, чипов (QA: 1.44:1 — едва видны) */
  --tx: #1A1326; --tx2: #3D3350; --tx3: #6E6283; --tx4: #6F6483; --lab: #6E6283; --mute: #716785;
  --acc: #E0194E; --acc-hi: #FF2E63; --acc-soft: #B0123C; --acc-bg: rgba(224,25,78,.09); --acc-line: rgba(224,25,78,.4); --on-acc: #FFFFFF; --acc-ink: #C8103F;
  --shadow: 0 24px 60px rgba(90,40,140,.14);
  color-scheme: light;
}
/* Контраст (QA 2026-10-06, WCAG AA): --tx4, --lab, --mute — не ниже 4.5:1 и на --chip (были 2.6–4.4: подвал, счётчики тегов, подписи меню) */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body { background: var(--bg); color: var(--tx); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
.dsp { font-family: var(--dsp); }
.lab { font-size: 12px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; color: var(--lab); margin-bottom: 11px; display: flex; align-items: center; gap: 7px; }
.muted { color: var(--mute); font-size: 12px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); display: inline-block; flex-shrink: 0; }
.i { width: 20px; height: 20px; flex-shrink: 0; }

/* ===== Шапка ===== */
.hdr { position: sticky; top: 0; z-index: 20; height: var(--head-h); padding: 0 16px; display: flex; align-items: center; gap: 12px;
       background: var(--head); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 9px; font-size: 21px; font-weight: 800; letter-spacing: -.4px; color: var(--tx); white-space: nowrap; }
.logo b { font-weight: 800; } .logo span { color: var(--acc); }
.sections { display: none; gap: 4px; }
.sections a { height: 34px; padding: 0 14px; display: flex; align-items: center; gap: 7px; border-radius: 17px; font-size: 14px; font-weight: 500; color: var(--tx3); }
.sections a:hover { color: var(--tx); background: var(--chip); }
.sections a[aria-current] { background: var(--acc); color: #fff; font-weight: 700; }
.hdr .search { display: none; height: 36px; width: 250px; margin-left: auto; padding: 0 14px; align-items: center; gap: 9px; border-radius: 18px;
               background: var(--surface2); border: 1px solid var(--line2); color: var(--tx4); }
.hdr .search .i { width: 16px; height: 16px; }
.hdr .search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--tx); font: 13px var(--body); }
.hdr .search input::placeholder { color: var(--tx4); }
.hdr .search:focus-within { border-color: var(--acc); }
/* Follow: «+ Follow» / «Following ✓» — по aria-pressed (ставит общий скрипт layout.php) */
.follow[aria-pressed="true"] .off, .follow:not([aria-pressed="true"]) .on { display: none; }
.lang { position: relative; margin-left: auto; }
.lang summary { list-style: none; height: 34px; padding: 0 10px; display: flex; align-items: center; gap: 6px; border-radius: 17px; border: 1px solid var(--line3);
                font-size: 13px; cursor: pointer; color: var(--tx); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary .i { width: 15px; height: 15px; }
.lang summary .i-chev { width: 12px; height: 12px; color: var(--tx4); }
.lang ul { position: absolute; right: 0; top: 42px; z-index: 30; min-width: 170px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line2);
           box-shadow: 0 16px 40px rgba(0,0,0,.25); }
.lang li a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 14px; color: var(--tx2); }
.lang li a:hover { background: var(--chip); color: var(--tx); }
.lang li a[aria-current] { color: var(--acc-ink); font-weight: 700; }
.theme { width: 34px; height: 34px; border-radius: 17px; border: 1px solid var(--line3); display: flex; align-items: center; justify-content: center; color: var(--tx); flex-shrink: 0; }
.theme .i { width: 16px; height: 16px; }
/* Телефон: поиск — лупой в шапке (в нижнем меню вместо него Models); на десктопе — поле поиска */
.hsearch { width: 34px; height: 34px; margin-left: auto; border-radius: 17px; border: 1px solid var(--line3); display: flex; align-items: center; justify-content: center; color: var(--tx); flex-shrink: 0; }
.hsearch .i { width: 16px; height: 16px; }
.hsearch + .search + .lang { margin-left: 0; }
/* Узкий телефон: логотип, лупа, язык и тема не влезали — тема уходила за край */
@media (max-width: 420px) { .hdr { gap: 8px; } .logo { font-size: 19px; gap: 7px; } .lang summary { padding: 0 8px; gap: 4px; } .lang summary .i-chev { display: none; } }
@media (max-width: 360px) { .logo { font-size: 18px; } .lang summary .i-globe { display: none; } }
:root[data-theme="dark"] .theme .i-moon, :root[data-theme="light"] .theme .i-sun { display: none; }
/* Разделы по ориентации (основная лента / Gay / Trans) — переключатель в шапке на десктопе; на телефоне — в шторке категорий */
.orient { display: none; gap: 2px; padding: 3px; border-radius: 17px; background: var(--chip); flex-shrink: 0; }
.orient a { height: 28px; padding: 0 11px; display: flex; align-items: center; border-radius: 14px; font-size: 12.5px; font-weight: 600; color: var(--tx3); }
.orient a:hover { color: var(--tx); }
.orient a[aria-current] { background: var(--surface); color: var(--tx); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
@media (min-width: 1024px) {
  .hdr { padding: 0 28px; gap: 24px; }
  .sections { display: flex; }
  .orient { display: flex; }
  .hdr .search { display: flex; }
  .hsearch { display: none; }
  .lang { margin-left: 0; }
  /* Сжимается только поле поиска: пункты меню не переносятся («Kısa videolar» в две строки в пилюле 34 px) */
  .logo, .sections, .lang { flex-shrink: 0; }
  .sections a { white-space: nowrap; }
  .hdr .search input { width: 0; text-overflow: ellipsis; }
}
/* Узкий десктоп (1024–1279: iPad альбомно, окно не на весь экран, ноутбук с масштабом 125%) — шапке нужно ~1160–1220 px,
   язык и тема уходили за край (QA 2026-10-06). Ужимаем отступы, логотип и пилюли; поле поиска — сколько останется (не меньше 112 px) */
@media (min-width: 1024px) and (max-width: 1279px) {
  .hdr { padding: 0 16px; gap: 12px; }
  .logo { font-size: 19px; gap: 7px; }
  .sections { gap: 2px; }
  .sections a { padding: 0 10px; font-size: 13.5px; }
  .orient a { padding: 0 8px; }
  .hdr .search { min-width: 112px; padding: 0 12px; gap: 7px; }
  .lang summary { padding: 0 9px; gap: 5px; }
  .lang summary .i-chev { display: none; }
}

/* ===== Нижнее меню (телефон) ===== */
.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
          padding: 0 6px env(safe-area-inset-bottom); display: flex; background: var(--head); border-top: 1px solid var(--line); }
.bottom a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; color: var(--tx4); }
.bottom a[aria-current] { color: var(--acc-ink); font-weight: 700; }
/* Подписи — в одну строку и с зазором; на 320 px мельче: жирное tr «Kısa videolar» переносилось, ru «Сохранённое», tr «Kaydedilenler» — впритык */
.bottom a { padding: 0 2px; white-space: nowrap; }
@media (max-width: 340px) { .bottom { padding: 0 3px env(safe-area-inset-bottom); } .bottom a { font-size: 9.5px; } }
.bottom .i { width: 23px; height: 23px; }
.bottom .dot { position: absolute; top: 12px; left: calc(50% + 7px); width: 8px; height: 8px; border: 2px solid var(--head); }
body.page { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 1024px) { .bottom { display: none; } body.page { padding-bottom: 0; } }

/* ===== Подвал ===== */
.ftr { margin-top: auto; padding: 22px 16px; border-top: 1px solid var(--line); text-align: center; font-size: 13px; color: var(--tx4); }
.ftr a { color: var(--tx3); }
.ftr a:hover { color: var(--acc); }
.ftr p { margin-top: 6px; font-size: 12px; color: var(--mute); }
/* Ссылки — строкой с переносом, без «·» в тексте (точка повисала в конце строки на телефоне); на десктопе (одна строка) — точки между ними */
.ftr-links { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 10px; }
@media (min-width: 1024px) {
  .ftr-links a { position: relative; }
  .ftr-links a + a::before { content: "·"; position: absolute; left: -7px; color: var(--tx4); pointer-events: none; }
}

/* ===== Общие элементы ===== */
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 18px 16px 40px; flex: 1; }
@media (min-width: 900px) { .wrap { padding: 24px 28px 56px; } }
.cta, .btn { height: 44px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px;
             background: var(--acc); color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; }
.cta:hover, .btn:hover { background: var(--acc-hi); color: #fff; }
.btn.ghost, .ghost { background: transparent; border: 1px solid var(--line2); color: var(--tx); }
.btn.ghost:hover, .ghost:hover { background: var(--chip); color: var(--tx); }
.chip { height: 34px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; border-radius: 17px; background: var(--chip); color: var(--tx2); font-size: 14px; border: 1px solid transparent; }
.chip:hover { color: var(--tx); border-color: var(--line3); }
.chip[aria-current], .chip.on { background: var(--acc); color: #fff; font-weight: 700; }
.chip small { font-size: 12px; opacity: .8; }   /* .7 — 4.4:1 в светлой теме */
.chip[aria-current] small, .chip.on small { opacity: 1; }   /* полупрозрачный белый на розовом — 2.9:1 */
.card { padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.crumbs { font-size: 13px; color: var(--tx4); margin-bottom: 18px; }
.crumbs a { color: var(--tx3); } .crumbs a:hover { color: var(--acc-ink); } .crumbs span { color: var(--tx2); }
.h1 { font-family: var(--dsp); font-size: clamp(32px, 6vw, 48px); line-height: 1.02; font-weight: 800; letter-spacing: -1px; overflow-wrap: break-word; }
/* Узкий телефон: длинное слово не влезало в строку (tr 404 «bulunamadı» — 300 px при 288) — шрифт мельче; крайний случай — перенос внутри слова */
@media (max-width: 380px) { .h1 { font-size: clamp(26px, 8.4vw, 32px); } }
.sub { margin-top: 6px; color: var(--tx3); font-size: 14px; }
.live-badge { padding: 2px 7px; border-radius: 5px; background: var(--acc); color: #fff; font: 800 10px/1.4 var(--body); letter-spacing: .3px; }
.nw { white-space: nowrap; }   /* «278,6 млн просмотров», «2.8亿 次观看» — число со словом не разрывать (zh/ja рвали и само слово) */

/* Визуальная проверка 2026-10-06: подвал — пункты не рвутся посередине («18 U.S.C. 2257»), удобнее нажимать на телефоне */
.ftr a { white-space: nowrap; display: inline-block; padding: 6px 2px; }

/* Подсказки поиска (suggest.js): категории, модели, студии по мере ввода */
.hdr .search, .find, #searchform { position: relative; }
.sugg { position: absolute; left: 0; top: calc(100% + 6px); z-index: 40; width: max(100%, 320px); max-height: min(70vh, 470px); overflow-y: auto; padding: 6px;
        border-radius: 14px; background: var(--surface); border: 1px solid var(--line2); box-shadow: 0 16px 40px rgba(0,0,0,.28); text-align: left; }
.sugg h4 { margin: 8px 10px 4px; font: 700 11px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--tx4); }
.sugg a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; border-radius: 10px; color: var(--tx2); font-size: 14px; }
.sugg a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg a b { color: var(--tx); font-weight: 800; }
.sugg a[aria-selected="true"], .sugg a:hover { background: var(--chip); color: var(--tx); }
.sugg small { margin-left: auto; padding-left: 8px; color: var(--tx4); font-size: 12px; flex: 0 0 auto; }
.sugg img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--chip); flex: 0 0 auto; }
.sugg .hash { width: 28px; flex: 0 0 auto; text-align: center; color: var(--acc-ink); font-weight: 800; }
.sugg .all { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.sheet .sugg { position: static; width: auto; max-height: none; margin-top: 10px; padding: 0; border: 0; box-shadow: none; background: none; }

/* Окно «Поделиться» (share.js): ссылка с копированием и куда отправить — на десктопе; на телефоне системное меню */
.share-dlg { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5,3,9,.6); backdrop-filter: blur(3px); }
.share-box { width: 100%; max-width: 440px; padding: 20px; border-radius: 20px; background: var(--surface); color: var(--tx); border: 1px solid var(--line2); box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.share-head { display: flex; align-items: center; justify-content: space-between; }
.share-head b { font: 800 20px var(--dsp); }
.share-x { width: 34px; height: 34px; border-radius: 50%; background: var(--chip); color: var(--tx2); font-size: 15px; }
.share-what { margin: 6px 0 14px; color: var(--tx3); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-link { display: flex; gap: 8px; }
.share-link input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg); color: var(--tx2); font: 13px var(--body); }
.share-copy { flex: 0 0 auto; height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; border-radius: 12px; background: var(--acc); color: #fff; font: 700 14px var(--body); }
.share-copy svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.share-copy.ok { background: var(--teal); color: #0A0710; }
.share-to { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 16px; }
.share-to a { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 6px 2px; border-radius: 12px; color: var(--tx2); font-size: 12px; font-weight: 600; }
.share-to a:hover { background: var(--chip); color: var(--tx); }
.share-to svg { width: 48px; height: 48px; padding: 12px; border-radius: 50%; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.share-to .s-tg svg { background: #2AABEE; } .share-to .s-wa svg { background: #25D366; } .share-to .s-x svg { background: #111; }
.share-to .s-rd svg { background: #FF4500; } .share-to .s-mail svg { background: var(--tx3); }
:root[data-theme="dark"] .share-to .s-x svg { background: #2a2a2a; }
/* Узкий экран (<390): пять кнопок с подписями не влезают (нужно 313 px) — пятая (Email) вылезала за рамку окна. Только значки,
   подпись остаётся для скринридера */
@media (max-width: 389px) {
  .share-box { padding: 16px; }
  .share-to { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .share-to a { position: relative; }
  .share-to svg { width: 100%; max-width: 48px; height: auto; aspect-ratio: 1; padding: 11px; }
  .share-to a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* Кнопка «сохранить» на плитках шортсов (всегда видна — на телефоне нет наведения) */
.tile-box { position: relative; min-width: 0; }
.tile-box > .tile { display: block; }
.tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-save { position: absolute; top: 8px; left: 8px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
             background: rgba(10,7,16,.55); backdrop-filter: blur(4px); }
.tile-save svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; }
.tile-save[aria-pressed="true"] { background: var(--acc); }
.tile-save[aria-pressed="true"] svg { fill: #fff; }
.bottom a.ping { animation: ef-ping .5s ease-in-out 3; }
@keyframes ef-ping { 50% { transform: scale(1.22); color: var(--acc); } }
