*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--text);font:15px/1.55 var(--font);min-width:0}
img{border:0;max-width:100%}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
hr{border:0;border-top:1px solid var(--line);height:0;margin:16px 0}
h1,h2,h3{line-height:1.25;text-wrap:balance}
.i{width:var(--ic);height:var(--ic);fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;flex:none}
.skip{position:absolute;left:-9999px;top:0;background:var(--accent);color:var(--ink);padding:8px 14px;z-index:1000;border-radius:0 0 var(--r-s) 0}
.skip:focus{left:0}
.wrap{max-width:1480px;margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
.main{padding-top:20px;padding-bottom:40px;min-height:50vh}

/* --- шапка --- */
.hdr{background:var(--surface);border-bottom:1px solid var(--line)}
.hdr-in{display:flex;align-items:center;gap:12px 16px;padding-top:12px;padding-bottom:12px;flex-wrap:wrap}
.hdr-logo{flex:none}
.nav{display:flex;gap:2px;flex-wrap:wrap;flex:1 1 auto}
.nav a{color:var(--text2);padding:8px 10px;border-radius:var(--r-s);font-weight:500;white-space:nowrap}
.nav a:hover{background:var(--surface2);color:var(--text);text-decoration:none}
.hdr-search{display:flex;align-items:center;background:var(--surface2);border:1px solid var(--line);border-radius:var(--r);padding-left:12px;flex:0 1 240px;min-width:160px}
.hdr-search input{background:transparent;border:0;color:var(--text);font:inherit;width:100%;min-width:0;padding:8px 0;outline:none}
.hdr-search:focus-within{border-color:var(--accent)}
.hdr-tools{display:flex;align-items:center;gap:6px;margin-left:auto}
.lang-sw{font-size:13px;color:var(--text2)}
.ibtn{width:40px;height:40px;border-radius:10px;border:0;background:transparent;display:inline-grid;place-items:center;color:var(--text2);cursor:pointer;padding:0;font:inherit}
.ibtn:hover{background:var(--surface2);color:var(--text)}
.nl-mode .i-sun{display:none}
[data-mode="dark"] .nl-mode .i-sun{display:block}
[data-mode="dark"] .nl-mode .i-moon{display:none}
.userbar{padding-top:0;padding-bottom:10px}
.ub{display:flex;align-items:center;gap:6px 16px;flex-wrap:wrap;font-size:13px;color:var(--text2)}
.ub a{color:var(--text2)}
.ub a:hover{color:var(--text)}
.ub .ub-me{display:inline-flex;align-items:center;gap:8px;color:var(--text)}
.ub .ava{width:28px;height:28px;border-radius:50%;object-fit:cover;background:var(--surface2)}
.ub .ub-add{background:var(--accent);color:var(--ink);padding:4px 12px;border-radius:999px;font-weight:600}
.ub .ub-add:hover{text-decoration:none;filter:brightness(1.08)}
.ub .ub-admin b{font-weight:600}
.ub .ub-out{margin-left:auto}
.ub-login label{display:inline-flex;gap:6px;align-items:center}
.ub-login .logininput{width:120px}
.ub-auto{font-size:12px}

/* --- подвал --- */
.ftr{border-top:1px solid var(--line);background:var(--surface);color:var(--muted);font-size:13px}
.ftr-in{padding-top:20px;padding-bottom:28px;display:flex;flex-wrap:wrap;gap:8px 28px;align-items:flex-start}
.ftr p{margin:0}
.ftr-links{display:flex;gap:16px}
.ftr-links a{color:var(--text2)}
.ftr-extra{margin-left:auto}

/* --- поля и кнопки --- */
input[type=text],input[type=password],input[type=search],input[type=email],input[type=number],input[type=url],input[type=date],textarea,select,.input,.logininput,.searchinput,.textarea{background:var(--surface2);color:var(--text);border:1px solid var(--line);border-radius:var(--r-s);padding:7px 10px;font:inherit;max-width:100%}
input:focus,textarea:focus,select:focus{outline:none;border-color:var(--accent)}
input::placeholder,textarea::placeholder{color:var(--muted)}
input[type=submit],input[type=button],button.btn,.btn{background:var(--accent);color:var(--ink);border:0;border-radius:var(--r-s);padding:8px 16px;font:inherit;font-weight:600;cursor:pointer}
input[type=submit]:hover,input[type=button]:hover,.btn:hover{filter:brightness(1.08)}
input[type=checkbox],input[type=radio]{accent-color:var(--accent)}
form{margin:0}

/* --- совместимость: старые шаблоны на таблицах --- */
td,th,p,li,ul,div{color:inherit;font-family:inherit}
td,th,p,li{font-size:inherit}
.tablehead,.tablebottom,.bordercolor,.tablebgcolor,.navbar,.row1,.row2{background:transparent;color:inherit}
.rowc1{background:var(--surface);color:var(--text)}
.rowc2{background:var(--surface2);color:var(--text)}
.head1,.head2{height:auto;background:transparent;color:var(--text);font-weight:700}
.title{font:600 20px/1.3 var(--font);color:var(--text)}
.clickstream,.smalltext,.smallText{font-size:13px;color:var(--text2)}
.marktext{color:var(--accent);background:var(--soft)}
.new{color:var(--accent);font-weight:600}
[bgcolor]{background-color:var(--surface)}
font[color]{color:var(--text2)}
table[border="1"],table.tableborder{border-color:var(--line)}
.box,.box .content{background:transparent}
.box .top,.box .bottom{display:none}

/* --- голосование (includes/rating.php) --- */
.rt-box{display:flex;width:100%;flex-direction:column;gap:6px;align-items:center;margin:0}
.rt-box .rt-bar{width:100%;max-width:220px;align-self:center}
.rt-cap{display:inline-flex;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:3px}
.rt-btn{display:inline-grid;place-items:center;min-width:42px;height:38px;padding:0 12px;border-radius:999px;color:var(--text2);background:transparent;border:0;cursor:pointer;text-decoration:none}
.rt-btn:hover{background:var(--surface2);color:var(--text);text-decoration:none}
.rt-btn.rt-down{height:32px;min-width:36px;color:var(--muted)}
.rt-btn.rt-mine{background:var(--soft);color:var(--accent)}
.rt-btn.rt-off{cursor:default}
.rt-btn.rt-off:not(.rt-mine){opacity:.5}
.rt-btn.rt-off:hover{background:transparent}
.rt-score,.rt-num{min-width:44px;text-align:center;font:700 16px/1 var(--font);font-variant-numeric:tabular-nums;color:var(--text)}
.rt-plus,.rt-minus{font:600 14px/1 var(--font);color:var(--text2);padding:0 6px;font-variant-numeric:tabular-nums}
.rt-bar{display:block;align-self:stretch;height:3px;border-radius:2px;background:var(--line);overflow:hidden;margin:0 6px}
.rt-bar i{display:block;height:100%;background:var(--accent);border-radius:2px;transition:width 1s linear}
.rt-bar.rt-idle{opacity:0}
.rt-msg{min-height:16px;font-size:12px;color:var(--muted)}
.rt-btn .i{width:20px;height:20px}
.rt-btn .i-c{display:none}
[data-brand="exifnz"] .rt-btn .i-b{display:none}
[data-brand="exifnz"] .rt-btn .i-c{display:block}

/* --- страница снимка --- */
.ph-title{font:700 22px/1.3 var(--font);margin:0 0 4px}
.ph-sub{color:var(--text2);font-size:13px;margin:0 0 14px}
.pt-strip{display:flex;justify-content:center;gap:6px;margin:4px auto 14px;padding:4px 0;--pt-s:96px;overflow:hidden}
.pt-th{flex:0 0 auto;position:relative;display:block;width:var(--pt-s);height:var(--pt-s);border-radius:var(--r-s);overflow:hidden;transition:transform .15s ease,box-shadow .15s ease}
.pt-th img{display:block;width:100%;height:100%;object-fit:cover;opacity:.75}
.pt-th:hover{transform:scale(1.5);z-index:50;box-shadow:0 8px 24px var(--shadow-lg)}
.pt-th:hover img{opacity:1}
.pt-th:first-child:hover{transform-origin:left center}.pt-th:last-child:hover{transform-origin:right center}
.pt-cur{outline:2px solid var(--accent);outline-offset:-2px}.pt-cur img{opacity:1}
@media (max-width:700px){.pt-strip{--pt-s:64px;gap:4px}.pt-th:hover{transform:scale(1.4)}}
.pt-pad{margin:0 0 12px;padding:16px;text-align:center;width:100%;border-radius:var(--r);overflow:hidden}
.pt-stage{position:relative;padding:0 46px}
.pt-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:5;width:36px;height:64px;display:flex;align-items:center;justify-content:center;color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:var(--r-s);opacity:.8}
.pt-arrow:hover{opacity:1;background:var(--surface2);text-decoration:none}
.pt-arrow-l{left:0}.pt-arrow-r{right:0}
@media (max-width:600px){.pt-stage{padding:0}.pt-arrow{width:28px;height:52px}}
.pt-hold{position:relative;display:inline-block;max-width:100%;line-height:0;vertical-align:top;overflow:hidden}
.pt-hold #im{display:block;width:auto;height:auto;max-width:100%;max-height:max(320px,calc(100vh - 160px));min-width:min(320px,100%);object-fit:contain}
.pt-crop{position:absolute;border:1px solid var(--on-photo);cursor:move;box-shadow:0 0 0 9999px var(--scrim);touch-action:none}
.pt-gl{display:none;position:absolute;pointer-events:none}
.pt-gv{top:0;bottom:0;border-left:1px dashed var(--on-photo)}.pt-gh{left:0;right:0;border-top:1px dashed var(--on-photo)}
.pt-gold .pt-gl{display:block}
.pt-h{position:absolute;width:14px;height:14px;background:var(--on-photo);border:1px solid var(--on-photo-edge);touch-action:none}
.pt-h-nw{left:0;top:0;cursor:nw-resize}.pt-h-n{left:calc(50% - 7px);top:0;cursor:n-resize}.pt-h-ne{right:0;top:0;cursor:ne-resize}
.pt-h-e{right:0;top:calc(50% - 7px);cursor:e-resize}.pt-h-se{right:0;bottom:0;cursor:se-resize}.pt-h-s{left:calc(50% - 7px);bottom:0;cursor:s-resize}
.pt-h-sw{left:0;bottom:0;cursor:sw-resize}.pt-h-w{left:0;top:calc(50% - 7px);cursor:w-resize}
.pt-ov{position:fixed;inset:0;z-index:100000;overflow:auto;cursor:zoom-out}
.pt-ov-in{min-width:100%;min-height:100%;display:flex}
.pt-ov-wrap{margin:auto;line-height:0}.pt-ov-wrap img{display:block;max-width:none;max-height:none}
.pt-ov-x{position:fixed;right:14px;top:8px;width:34px;height:34px;line-height:32px;text-align:center;font-size:26px;color:var(--on-photo);background:var(--scrim);border-radius:17px;cursor:pointer}

/* панель под снимком */
.ph-tools{display:flex;align-items:center;justify-content:center;gap:4px 14px;flex-wrap:wrap;margin:0 0 20px}
.ph-tools .grp{display:inline-flex;align-items:center;gap:2px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:3px}
.ph-tools .tb{width:40px;height:40px;border-radius:var(--r-s);border:0;background:transparent;color:var(--text2);display:inline-grid;place-items:center;cursor:pointer;padding:0;font:600 13px var(--font);text-decoration:none}
.ph-tools .tb:hover{background:var(--surface2);color:var(--text);text-decoration:none}
.ph-tools .tb.on{background:var(--soft);color:var(--accent)}
.ph-tools .bgs{display:inline-flex;align-items:center;gap:8px;padding:0 8px;font-size:12px;color:var(--text2)}
.ph-tools .ev{display:inline-flex;align-items:center;gap:2px;font-size:13px;color:var(--text2)}
.ph-tools .ev .evv{min-width:34px;text-align:center;font-variant-numeric:tabular-nums;color:var(--text)}
#pt_bgs span,#pt_bgs i{cursor:pointer}
#pt_msg{width:100%;text-align:center;font-size:13px;min-height:0;color:var(--text2)}
#pt_msg:empty{display:none}
#pt_msg.bad{color:var(--accent)}

/* сведения и комментарии */
.ph-grid{display:grid;grid-template-columns:minmax(260px,340px) minmax(0,1fr);gap:28px;align-items:start}
@media (max-width:860px){.ph-grid{grid-template-columns:minmax(0,1fr)}}
.ph-info{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px;display:flex;flex-direction:column;gap:14px}
.ph-author{display:flex;align-items:center;gap:10px}
.ph-author .ava{width:40px;height:40px;border-radius:50%;object-fit:cover;background:var(--surface2)}
.ph-dl{margin:0;display:grid;grid-template-columns:auto 1fr;gap:6px 12px;font-size:14px}
.ph-dl dt{color:var(--muted)}
.ph-dl dd{margin:0;min-width:0;overflow-wrap:anywhere}
.ph-actions{display:flex;gap:4px;align-items:center}
.ph-links{display:none;position:absolute;z-index:60;width:min(320px,92vw);background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:12px;box-shadow:0 12px 32px var(--shadow);font-size:13px}
.ph-links input{width:100%;font-size:12px;margin:2px 0 8px}
.ph-comments h2{font:700 18px var(--font);margin:0 0 12px}

@media (max-width:760px){
  .nav{order:3;width:100%;flex:1 0 100%;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .nav a{flex:none}
  .hdr-search{flex:1 1 auto}
  .ph-title{font-size:19px}
}

/* ===== D2: главная, список разделов, ленты рядами, страница раздела (2026-11-02) =====
   Подпись на снимке и значки поверх фото не зависят от темы: цвета задаются локально --ov / --ovt (тёмная подложка и белый текст). */
.sec-h{font:700 18px/1.3 var(--font);margin:0 0 12px}
.sec-h a{color:inherit;text-decoration:none}
.sec-h a::first-letter,.sec-h::first-letter{text-transform:uppercase}
[data-fold]{cursor:pointer}
.sec-row{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 12px}
.sec-row .sec-h{margin:0}
.sec-links{display:flex;gap:14px;font-size:14px}
.sec-all{font-size:14px;font-weight:600;text-decoration:none;white-space:nowrap}
.hm-sec{margin:0 0 30px}
.hm-cols{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:28px;align-items:start}
.hm-main,.hm-aside{min-width:0}
.hm-blk{margin:0 0 22px}
.hm-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:12px 14px;overflow-wrap:anywhere}
.hm-pic{padding:0;overflow:hidden;text-align:center}
.hm-pic p{margin:0}
.hm-pic img{display:block;width:100%;height:auto}
.pic-card{margin:0;text-align:left}
.pic-box{position:relative;background:var(--surface2)}
.pic-box img{display:block;width:100%;height:auto;max-height:420px;object-fit:contain}
.pic-box .ph-a{display:block}
.pic-card figcaption{display:flex;flex-direction:column;gap:2px;padding:10px 14px 12px}
.pic-t{font-weight:600;color:var(--text)}
.pic-m,.pic-f{font-size:12px;color:var(--text2)}
.pic-r{color:var(--accent)}
/* текущий пункт меню (themes/core/nav.js) */
.nav a.on{background:var(--soft);color:var(--accent)}
.ub a.on:not(.ub-add){color:var(--accent);font-weight:600}
.hm-sm{font-size:13px;color:var(--text2);margin:0 0 8px}
.hm-rss{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.ph-empty{color:var(--text2);margin:8px 0}
@media (max-width:960px){.hm-cols{grid-template-columns:minmax(0,1fr)}}

/* список разделов карточками */
.cl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:var(--gap,10px)}
.cl-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);transition:border-color .15s,background .15s;min-width:0}
.cl-card:hover{border-color:var(--accent);background:var(--surface2)}
.cl-main{display:flex;align-items:center;gap:12px;padding:12px 14px;color:var(--text);text-decoration:none;min-width:0}
.cl-main:hover{text-decoration:none}
.cl-icw,.ct-icw{flex:none;width:40px;height:40px;border-radius:var(--r-s);background:var(--soft);color:var(--accent);display:inline-grid;place-items:center}
.cl-tx{flex:1;min-width:0;display:flex;flex-direction:column}
.cl-nm{font-weight:600;overflow-wrap:anywhere}
.cl-sh{color:var(--text2);font-size:13px;line-height:1.35}
.cl-meta{display:flex;align-items:center;gap:6px;flex:none;color:var(--muted);font-size:13px;font-variant-numeric:tabular-nums}
.cl-new{background:var(--accent);color:var(--ink);font:700 11px/1 var(--font);padding:3px 6px;border-radius:999px;white-space:nowrap}
.cl-sub{padding:0 14px 10px 66px;font-size:13px;color:var(--text2)}

/* ленты снимков рядами по высоте: пропорция кадра приходит в --r (0.62..2.2), целевая высота ряда - в --h */
.ph-feed{--h:240px;display:flex;flex-wrap:wrap;gap:var(--gap,8px)}
.ph-feed::after{content:"";flex-grow:1000000}
.ph-feed.ph-fit::after{display:none}
.ph-it{margin:0;display:inline-block;max-width:100%;vertical-align:top}
.ph-f{display:block;position:relative;flex:calc(var(--r)*100) 1 calc(var(--r)*var(--h));min-width:0}
.ph-box{position:relative}
.ph-f .ph-box{background:var(--surface2);border-radius:var(--r-s);overflow:hidden}
.ph-f .ph-box::before{content:"";display:block;padding-top:calc(100%/var(--r))}
.ph-f .ph-box>a,.ph-f .ph-box>.sc-box,.ph-f .ph-box .sc-in{position:absolute;inset:0;display:block!important;width:100%;height:100%}
.ph-f .ph-box img{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover;display:block;transition:transform .25s}
.ph-f.ph-x .ph-box img{object-fit:contain}
.ph-f:hover .ph-box img{transform:scale(1.025)}
.ph-f .ph-cap{position:absolute;left:0;right:0;bottom:0;padding:28px 10px 8px;background:linear-gradient(transparent,var(--ov));color:var(--ovt);display:flex;flex-direction:column;gap:2px;font-size:13px;line-height:1.3;opacity:0;transition:opacity .15s;pointer-events:none;border-radius:0 0 var(--r-s) var(--r-s)}
.ph-f:hover .ph-cap,.ph-f:focus-within .ph-cap{opacity:1}
.ph-f .ph-cap a{pointer-events:auto;color:inherit;text-decoration:none}
.ph-f .ph-cap a:hover{text-decoration:underline}
.ph-t{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ph-m{display:flex;justify-content:space-between;gap:10px;align-items:baseline}
.ph-au{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ph-s{display:inline-flex;gap:10px;white-space:nowrap;font-variant-numeric:tabular-nums}
.ph-r svg,.ph-c svg{margin-right:3px;vertical-align:-1px}
.ph-e{font-size:11.5px;opacity:.78;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ph-e2{opacity:.66;font-variant-numeric:tabular-nums}   /* вторая строка: параметры съёмки; скрывается теми же правилами, что .ph-e */
.ph-f .ph-box .ph-potd,.ph-f .ph-box>[class*="potd"]{z-index:2}
/* вне ленты (поиск, профиль, избранное): миниатюра S и подпись под ней */
.ph-it:not(.ph-f){text-align:center}
.ph-it:not(.ph-f) .ph-cap{display:flex;flex-direction:column;gap:2px;padding:6px 2px;font-size:13px}
.ph-it:not(.ph-f) .ph-e{display:none}
.ph-it:not(.ph-f) .ph-m{justify-content:center}
@media (hover:none){.ph-f .ph-cap{opacity:1}.ph-f .ph-e{display:none}}
@media (max-width:600px){.ph-f{flex-basis:calc(var(--r)*min(var(--h),150px))}}
@media (prefers-reduced-motion:reduce){.ph-f .ph-box img,.ph-f .ph-cap{transition:none}.ph-f:hover .ph-box img{transform:none}}

/* страница раздела */
.ct-head{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px;margin:0 0 22px;align-items:start}
.ct-main,.ct-aside{min-width:0}
.ct-title{display:flex;align-items:center;gap:12px;font:700 26px/1.2 var(--font);margin:0 0 6px}
.ct-short{margin:0 0 10px;color:var(--text2)}
.ct-stats{display:flex;flex-wrap:wrap;gap:6px 18px;color:var(--text2);font-size:14px;margin:0 0 14px;align-items:center}
.ct-st b{color:var(--text);font-weight:600}
.ct-tabs{display:flex;align-items:flex-end;gap:2px;border-bottom:1px solid var(--line)}
.ct-tab{padding:6px 14px;background:transparent;color:var(--text2);text-decoration:none;border:1px solid transparent;border-bottom:none;border-radius:var(--r-s) var(--r-s) 0 0}
.ct-tab:hover{color:var(--text);text-decoration:none}
.ct-tab.ct-on{background:var(--surface);border-color:var(--line);color:var(--text);font-weight:600;position:relative;top:1px}
.ct-upl{margin-left:auto;padding-bottom:4px}
.ct-pane{padding:12px 2px 4px}
.ct-desc{line-height:1.6}
.ct-notify{margin-top:10px}
.ct-form{margin:0 0 8px}
.ct-top{margin:8px 0;line-height:2}
.ct-lbl{color:var(--text2);margin-right:4px}
.ct-chip{display:inline-block;padding:0 9px;border:1px solid var(--line);border-radius:999px;background:var(--surface);text-decoration:none;white-space:nowrap}
.ct-chip-on{border-color:var(--accent);background:var(--soft)}
.ct-n{color:var(--muted);font-size:90%}
.ct-potdrow{margin-top:10px}
.ct-btn{display:inline-block;padding:5px 14px;border:1px solid var(--accent);border-radius:var(--r-s);background:var(--soft);color:var(--accent);text-decoration:none;font-weight:600}
.ct-btn:hover{background:var(--surface2);text-decoration:none}
.ct-note{margin:8px 0 16px;padding:8px 12px;background:var(--surface);border-left:3px solid var(--accent);border-radius:var(--r-s)}
.ct-aside{display:flex;flex-direction:column;gap:12px}
.ct-side{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
.ct-bar{cursor:pointer;padding:8px 12px;display:flex;justify-content:space-between;align-items:center;font-size:14px}
.ct-bar .ct-arr{color:var(--text2)}
.ct-body{text-align:center;padding:0}
.ct-body img{display:block;width:100%;height:auto;max-height:170px;object-fit:cover}
.ct-bar-pg{color:var(--text2);font-size:13px;margin:0 0 10px}
.ct-pg{margin:18px 0;text-align:center}
.ct-jump{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:16px 0 24px}
.ct-coms-h{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin:0 0 8px}
.ct-coms-h .sec-h{margin:0}
@media (max-width:860px){.ct-head{grid-template-columns:minmax(0,1fr)}.ct-aside{flex-direction:row;flex-wrap:wrap}.ct-side{flex:1 1 200px}.ct-title{font-size:22px}}

/* D3: формы старых шаблонов на узком экране - строки таблицы становятся блоками, поля не шире экрана */
@media (max-width:640px){
  form table{max-width:100%}
  form td.row1,form td.row2,form td.head1[colspan]{display:block;width:auto!important;box-sizing:border-box}
  form td.row1+td.row1,form td.row2+td.row2{padding-top:0}
  form input[type=text],form input[type=password],form input[type=email],form input[type=url],form input[type=search],form input[type=number],form input:not([type]),form select,form textarea{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
  form input[type=file]{max-width:100%}
  form td[nowrap]{white-space:normal}
  form td.row1 table,form td.row2 table{width:100%}
  form td.row1 table td,form td.row2 table td{display:inline-block;width:auto!important}
  form input[type=date]{width:auto;max-width:100%}
}

/* значки интерфейса (includes/theme.php th_icon): ссылки «написать», почта, сайт; кнопка «в избранное» */
svg.ic-pm,svg.ic-email,svg.ic-homepage{width:18px;height:18px;vertical-align:-4px;color:var(--text2)}
a:hover svg.ic-pm,a:hover svg.ic-email,a:hover svg.ic-homepage{color:var(--accent)}
.tb.ic-fav.on{color:var(--accent)}
.tb.ic-fav.on svg{fill:currentColor}

/* переход между разделами на странице раздела */
/* 18+ в лентах и карточках: рамка размытия заполняет ячейку (инлайн-стили sc_apply не перебивают положение) */
.ph-f .ph-box>.sc-box{position:absolute!important;inset:0;display:block!important;width:100%;height:100%;overflow:hidden}
.ph-f .ph-box .sc-in{position:absolute!important;inset:0;display:block!important;width:100%;height:100%}
.ph-f .ph-box .sc-in .ph-a{display:block;width:100%;height:100%}
.pic-box .sc-box{display:block!important;width:100%;max-width:100%}
.pic-box .sc-in{display:block!important}
.pic-box .sc-in img{width:100%;height:auto}

/* D3d: fluid forms (settings, register, contact, blocklist…) */
.fl-tbl{width:100%;max-width:760px;box-sizing:border-box;border-collapse:separate;background:var(--surface);border-radius:var(--r-s);margin:0 0 16px}
.fl-tbl.fl-narrow{max-width:520px}
.fl-tbl td{box-sizing:border-box}
.fl-tbl td.row1,.fl-tbl td.row2{padding:10px 12px;border-top:1px solid var(--line)}
.fl-tbl tr:first-child td{border-top:0}
.fl-tbl input.input,.fl-tbl input[type=text],.fl-tbl input[type=password],.fl-tbl input[type=email],.fl-tbl select,.fl-tbl textarea{width:100%;max-width:100%;box-sizing:border-box}
.fl-tbl input[type=radio],.fl-tbl input[type=checkbox]{width:auto}
.fl-hint{color:var(--muted)}
@media (max-width:640px){.fl-tbl,.fl-tbl.fl-narrow{max-width:100%}}
.fl-tbl td.head1{padding:12px 12px 6px;border-top:1px solid var(--line)}
.fl-tbl input[type=reset],.fl-tbl input[type=button]{width:auto}

/* D3e: полоса остатка времени у ссылки «изменить» */
a.ce-ed{display:inline-flex;flex-direction:column;vertical-align:top;line-height:1.2}
.ce-bar{display:block;height:2px;border-radius:2px;background:var(--line);overflow:hidden;margin-top:2px}
.ce-bar b{display:block;height:100%;background:var(--accent);transition:width 1s linear}

/* D3e: меню действий (персонал / автор) */
.st-menu{position:relative;display:inline-block;font-size:13px}
.st-menu>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border:1px solid var(--line);border-radius:999px;background:var(--surface2);color:var(--text2);user-select:none}
.st-menu>summary::-webkit-details-marker{display:none}
.st-menu>summary:hover,.st-menu[open]>summary{border-color:var(--accent);color:var(--text)}
.st-pop{position:absolute;right:0;top:calc(100% + 6px);z-index:60;min-width:200px;max-width:min(88vw,360px);display:flex;flex-direction:column;gap:6px;padding:10px 12px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-s);box-shadow:0 10px 30px var(--shadow);text-align:left;white-space:normal}
.st-pop a,.st-pop button,.st-pop form{display:block;color:var(--text2);font-size:13px}
.st-pop form{margin:0!important}
.st-pop a:hover{color:var(--accent)}
.st-pop .smalltext{margin:0!important}
.st-row{margin:6px 0}
.pf-actions .st-menu>summary{padding:6px 12px}
@media (max-width:640px){.st-pop{right:auto;left:0}}

/* D3e: переход между разделами - выпадающий список из названия */
.ct-dd{position:relative;min-width:0}
.ct-dd>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;gap:6px;border-radius:var(--r-s);padding:0 6px;margin:0 -6px;user-select:none}
.ct-dd>summary::-webkit-details-marker{display:none}
.ct-dd>summary:hover,.ct-dd[open]>summary{background:var(--surface2)}
.ct-car{width:22px;height:22px;flex:none;fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s}
.ct-dd[open] .ct-car{transform:rotate(180deg);stroke:var(--accent)}
.ct-ddp{position:absolute;left:0;top:calc(100% + 6px);z-index:70;min-width:230px;max-width:90vw;padding:6px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:0 12px 32px var(--shadow)}
.ct-ddl{display:flex;flex-direction:column;gap:2px}
.ct-sw{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:var(--r-s);color:var(--text2);font:500 14px/1.3 var(--font);text-decoration:none}
.ct-sw:hover{background:var(--surface2);color:var(--text);text-decoration:none}
.ct-sw.on{background:var(--soft);color:var(--accent)}
.ct-swi{width:18px;height:18px;flex:none}

/* D3e: 18+ в лентах - реальный порядок обёрток: a.ph-a > .sc-box > .sc-in > img (размытие внутри плитки) */
.ph-f .ph-box .ph-a>.sc-box,.ph-f .ph-box .sc-box{position:absolute!important;inset:0;display:block!important;width:100%;height:100%;overflow:hidden}
.ph-f .ph-box .sc-in{position:absolute!important;inset:0;display:block!important;width:100%;height:100%}
.ph-f .ph-box .sc-in img{position:absolute;inset:0;width:100%;height:100%}
.ph-f:hover .ph-box .sc-in img{transform:none}

.cm-err{margin:6px 0 10px;padding:8px 12px;border:1px solid var(--accent);border-left-width:4px;border-radius:var(--r);background:var(--surface);color:var(--text);font-size:13px}
.cm-err-left{color:var(--text2);white-space:nowrap}

/* D3g: метка PhotoTools под комментарием */
.pt-note{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px 8px;margin-top:4px;color:var(--accent);text-decoration:none}
a.pt-note:hover{color:var(--text);text-decoration:none}
.pt-note-off{color:var(--text2)}
.pt-note>.pt-ic{width:18px;height:18px}
.pt-chips{display:inline-flex;align-items:center;color:var(--text2)}
.pt-row{gap:8px!important}
.pt-evv{font-variant-numeric:tabular-nums;font-size:13px}
.pt-chip-sm{display:inline-flex;color:var(--accent)}

/* D5: подсветка формы входа при переходе с форума */
.ub-login.ub-hl{outline:2px solid var(--accent);outline-offset:4px;border-radius:var(--r-s)}

/* D5c: иконки техники в данных съёмки */
.eq-ic{display:inline-block;vertical-align:-3px;margin-right:6px;color:var(--muted)}
a.eq-add{color:var(--accent)}a.eq-add .eq-ic{color:inherit}

/* D5d: участники карточками */
.ml-count{color:var(--muted);font-weight:400;font-size:.7em}
.ml-bar{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:flex-end;margin:12px 0 18px;padding:12px 14px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r)}
.ml-bar label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted)}
.ml-bar .input,.ml-bar .select{min-width:0}
.ml-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}
.ml-card{position:relative;display:flex;align-items:flex-start;gap:12px;padding:14px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);min-width:0}
.ml-card:hover{border-color:var(--accent)}
.ml-ava{flex:none;display:block}
.ml-ava img{display:block;width:64px;height:64px;border-radius:50%;object-fit:cover;border:1px solid var(--line)}
.ml-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.ml-name{font-weight:600;font-size:15px;color:var(--text);overflow-wrap:anywhere}
.ml-place{font-size:12px;color:var(--text2)}
.ml-stats{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:12px;color:var(--text2);margin-top:2px}
.ml-stats b{color:var(--text);font-weight:600}
.ml-join{font-size:11px;color:var(--muted)}
.ml-acts{display:flex;flex-direction:column;gap:8px}
.ml-acts .ic-l{color:var(--muted)}.ml-acts .ic-l:hover{color:var(--accent)}
.ml-paging{margin:18px 0}
@media (max-width:480px){.ml-grid{grid-template-columns:1fr}.ml-bar label{flex:1 1 140px}}

/* ===== S5: вывод разделов (2026-11-03) =====
   Панель «Разделы» в шапке (.sx-dd), строка подразделов и «Лучшее по подразделам» на странице раздела, страница «Все разделы», строка «Ещё» на главной.
   Только токены темы. includes/sections.php, themes/core/ui.js (положение панели). */
.sx-dd{position:relative;flex:none;display:block}
.nav .sx-dd>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;gap:4px;padding:8px 10px;border-radius:var(--r-s);font-weight:500;white-space:nowrap;color:var(--text2);user-select:none}
.nav .sx-dd>summary::-webkit-details-marker{display:none}
.nav .sx-dd>summary:hover,.nav .sx-dd[open]>summary{background:var(--surface2);color:var(--text)}
.nav .sx-dd.sx-cur>summary{background:var(--soft);color:var(--accent)}
.sx-dd[open] .ct-car{transform:rotate(180deg);stroke:var(--accent)}
.sx-pop{position:absolute;left:0;top:calc(100% + 6px);z-index:70;width:min(900px,94vw);max-height:min(78vh,680px);overflow:auto;padding:14px 16px 10px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:0 12px 32px var(--shadow)}
.sx-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:2px 20px}
.sx-col{min-width:0;padding:4px 0 8px}
.nav .sx-pop a{display:flex;align-items:center;gap:8px;white-space:normal;border-radius:var(--r-s);text-decoration:none}
.nav .sx-pop a:hover{background:var(--surface2);color:var(--text);text-decoration:none}
.nav .sx-pop a.sx-top{padding:6px 8px;font-weight:600;color:var(--text)}
.sx-ic{width:20px;height:20px;flex:none;color:var(--accent)}
.sx-nm{flex:1;min-width:0;overflow-wrap:anywhere}
.sx-subl{display:flex;flex-direction:column;padding-left:36px}
.nav .sx-pop a.sx-sub{justify-content:space-between;padding:3px 8px;font-size:13px;font-weight:400;color:var(--text2)}
.sx-foot{margin-top:6px;padding-top:8px;border-top:1px solid var(--line);text-align:right}
.nav .sx-pop .sx-foot a{display:inline-flex;padding:6px 10px;font-size:13px;color:var(--accent)}
@media (max-width:760px){
  .sx-pop{position:fixed;left:8px;right:8px;top:120px;width:auto;max-height:calc(100vh - 140px);max-height:calc(100dvh - 140px)}
  .sx-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 12px}
}
@media (max-width:420px){.sx-grid{grid-template-columns:minmax(0,1fr)}}

/* чипы: подразделы, «Ещё», страница «Все разделы» */
.sx-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 11px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--text2);font-size:13px;line-height:1.3;text-decoration:none}
.sx-chip:hover{border-color:var(--accent);color:var(--text);text-decoration:none}
.sx-chip.on{background:var(--soft);border-color:var(--accent);color:var(--accent)}
.sx-chip.sx-sleep{opacity:.72}
.sx-chip.sx-sleep:hover,.sx-chip.sx-sleep.on{opacity:1}
.sx-up{color:var(--muted)}
.sx-n{color:var(--muted);font-variant-numeric:tabular-nums}
.sx-subs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.sx-more{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0 0}
.sx-more-l{color:var(--muted);font-size:13px}
.sec-all{font-size:13px;white-space:nowrap}

/* страница «Все разделы» */
.sx-h1{font-size:24px;margin:0 0 16px}
.sx-all{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:12px;align-items:start}
.sx-blk{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding-bottom:12px;min-width:0}
.sx-blk:hover{border-color:var(--accent)}
.sx-head{display:flex;align-items:center;gap:12px;padding:12px 14px;color:var(--text);text-decoration:none;min-width:0}
.sx-head:hover{text-decoration:none}
.sx-chips{display:flex;flex-wrap:wrap;gap:6px;padding:0 14px}
@media (max-width:420px){.sx-all{grid-template-columns:minmax(0,1fr)}}

/* «Лучшее по подразделам» */
.sx-best{margin:0 0 22px}
.sx-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px}
.sx-tile{margin:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden;min-width:0}
.sx-pic{display:block;aspect-ratio:3/2;background:var(--surface2);overflow:hidden}
.sx-pic img{display:block;width:100%;height:100%;object-fit:cover}
.sx-pic .sc-box,.sx-pic .sc-in{display:block;width:100%;height:100%}
.sx-tile figcaption{display:flex;flex-direction:column;gap:2px;padding:8px 12px 10px}
.sx-tn{font-weight:600;font-size:13px;color:var(--text)}
.sx-tt{font-size:12px;color:var(--text2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ===== L2: признаки снимков (2026-11-03) =====
   Строка раздела: подразделы слева, признаки справа (чипы с пунктирной рамкой отличают признак от подраздела). includes/traits.php */
.sx-row{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:8px 20px;margin:0 0 16px}
.sx-row .sx-subs{margin:0}
.sx-traits{display:flex;flex-wrap:wrap;gap:8px;margin-left:auto}
.sx-chip.sx-trait{border-style:dashed}
.sx-chip.sx-trait.on{border-style:solid}
.trt-boxes{display:inline-flex;flex-wrap:wrap;gap:6px 16px}
.trt-box{display:inline-flex;align-items:center;gap:6px;cursor:pointer}
@media (max-width:640px){.sx-traits{margin-left:0}}
/* L2c: общий зачёт (2026-11-03) */
.sx-note{margin:10px 0;color:var(--text2);max-width:720px}
.sx-note a{color:var(--link, inherit)}

/* D6: аватары в «Сейчас на сайте» (2026-11-03): раньше без размера, noimage растягивался до 400 px. includes/sessions.php */
.wo-ava{display:block;width:40px;height:40px;max-width:40px;border-radius:50%;object-fit:cover;background:var(--surface2);border:1px solid var(--line)}
#nowonline table{border-collapse:separate;border-spacing:6px}
.pic-box img{max-height:520px}
