/* golovarus: страница записи. Подключается только на записях. Файлы по форматам, фото с миниатюрами, похожие фотокарточками. */
body.gr.single-post .site-main{max-width:var(--gr-wrap);margin-inline:auto;padding:14px var(--gr-gut) 8px}
body.gr.single-post .breadcrumb{max-width:none;font-size:14px;color:var(--gr-muted);margin:0 0 10px}
body.gr.single-post .breadcrumb a,body.gr.single-post .breadcrumb span{color:var(--gr-muted)}

.gr-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:40px;align-items:start}
.gr-hero--nomedia{grid-template-columns:minmax(0,720px)}
.gr-hero .entry-header{margin:0;padding:0}
body.gr .gr-post h1.entry-title{max-width:none;font:400 34px/1.12 var(--gr-font-head);color:var(--gr-ink);margin:0;text-wrap:balance;overflow-wrap:anywhere;text-align:left}

/* фото: на ПК стоит рядом с текстом и едет за ним, чтобы слева не оставалось пустоты; пальцем лента листается */
.gr-hero__media{position:sticky;top:84px;min-width:0}
.admin-bar .gr-hero__media{top:108px}
.gr-gal{position:relative}
body.gr .gr-hero__media .vkwpb_gallery{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;border-radius:var(--gr-radius);background:var(--gr-surface);border:1px solid var(--gr-line);margin:0;gap:0;height:clamp(420px,calc(100vh - 200px),680px)}
body.gr .gr-hero__media .vkwpb_gallery::-webkit-scrollbar{display:none}
body.gr .gr-hero__media .vkwpb_img_wrap{position:relative;flex:0 0 100%;scroll-snap-align:start;display:flex;align-items:center;justify-content:center;background:none;margin:0;width:auto;height:100%;padding:0}
body.gr .gr-hero__media .vkwpb_img_wrap a{display:contents}
body.gr .gr-hero__media .vkwpb_img_wrap img{display:block;width:100%;height:100%;max-width:none;margin:0;border-radius:0;object-fit:contain}
body.gr .gr-hero__media .gr-small img{width:auto;height:auto;max-width:92%;max-height:92%}
body.gr .gr-hero__media .vkwpb_img_wrap span{display:none}
body.gr .gr-gal__btn{display:none;position:absolute;top:50%;width:44px;height:44px;margin:-22px 0 0;padding:0;border:0;border-radius:8px;background:rgba(42,31,51,.78);color:#fff;cursor:pointer;place-items:center;transition:transform .12s var(--gr-ease),opacity .15s ease}
.gr-gal__btn--prev{left:10px}
.gr-gal__btn--next{right:10px}
body.gr .gr-gal__btn:active{transform:scale(.97)}
body.gr .gr-gal__btn[disabled]{opacity:0;pointer-events:none}
@media (min-width:768px) and (hover:hover){body.gr .gr-gal__btn{display:grid}}
.gr-thumbs{display:flex;gap:6px;margin-top:8px;overflow-x:auto;scrollbar-width:none}
.gr-thumbs::-webkit-scrollbar{display:none}
body.gr .gr-thumb{flex:none;display:block;width:58px;height:58px;margin:0;padding:0;border:0;border-radius:6px;background:var(--gr-tint);overflow:hidden;cursor:pointer;opacity:.75;transition:opacity .15s ease}
body.gr .gr-thumb img{display:block;width:100%;height:100%;margin:0;object-fit:cover;object-position:center 25%;border-radius:0}
body.gr .gr-thumb.is-on{opacity:1;outline:2px solid var(--gr-accent);outline-offset:-2px}
body.gr .gr-thumb:focus-visible{outline:2px solid var(--gr-accent);outline-offset:-2px}

/* файлы: белая карточка в сливовой рамке, группы по формату */
.gr-dl{margin-top:16px}
body.gr .gr-dl h2.mzl-dl-title{font:500 14px/1.3 var(--gr-font-body);letter-spacing:0;color:var(--gr-muted);margin:0 0 8px;text-align:left}
.gr-files{background:var(--gr-surface);border-radius:var(--gr-radius);box-shadow:0 0 0 2px var(--gr-accent);padding:12px 16px 10px}
.gr-files--one{padding:12px}
.gr-files__h{display:flex;align-items:baseline;gap:10px;font:400 20px var(--gr-font-head);margin-bottom:2px}
.gr-files__h span{font:400 13px var(--gr-font-body);color:var(--gr-muted)}
.gr-fg{padding:8px 0 4px;border-top:1px dashed var(--gr-line)}
.gr-files__h+.gr-fg,.gr-warn+.gr-fg{border-top:0}
.gr-fg__h{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--gr-accent);margin:2px 0 0}
.gr-fg__h b{font-weight:500;color:var(--gr-muted)}
.gr-fg__n,.gr-files__note{margin:2px 0 2px;font-size:12.5px;color:var(--gr-muted)}
.gr-files__note{margin-top:8px}
body.gr .gr-files ul{list-style:none;margin:0;padding:0}
body.gr .gr-f{display:flex;align-items:center;gap:10px;margin:0;padding:6px 0}
body.gr .gr-f::before{display:none}
.gr-f__x{flex:none;width:40px;padding:4px 0;border-radius:3px;background:var(--gr-ink);color:#fff;font:600 10.5px var(--gr-font-body);text-align:center}
.gr-f__n{flex:1;min-width:0;font-size:14px;font-weight:500;overflow-wrap:anywhere}
.gr-f__n small{display:block;font-weight:400;font-size:12px;color:var(--gr-muted)}
body.gr .gr-f__get{display:inline-flex;align-items:center;gap:5px;flex:none;min-height:36px;padding:0 14px;border-radius:18px;background:var(--gr-accent);color:#fff;font:600 13.5px var(--gr-font-body);text-decoration:none;transition:transform .12s var(--gr-ease),background .15s ease}
.gr-f__get:active{transform:scale(.97)}
@media (hover:hover){body.gr .gr-f__get:hover{background:var(--gr-accent-d)}}
.gr-fm summary{cursor:pointer;color:var(--gr-accent);font-weight:600;font-size:14px;padding:4px 0 6px;list-style:none}
.gr-fm summary::-webkit-details-marker{display:none}
.gr-fm summary::after{content:" ▾"}
.gr-fm[open] summary::after{content:" ▴"}
.gr-warn{margin:6px 0 4px;padding:8px 11px;border-radius:8px;background:#FFF4E0;color:#7A4A00;font-size:13px;line-height:1.4}
body.gr .gr-go{display:flex;align-items:center;justify-content:center;gap:12px;min-height:58px;padding:10px 16px;border-radius:30px;background:var(--gr-accent);color:#fff;font:600 18px/1.15 var(--gr-font-body);text-decoration:none;text-align:left;transition:transform .12s var(--gr-ease),background .15s ease}
.gr-go small{display:block;margin-top:2px;font-size:13px;font-weight:400;color:#E6D6EE}
.gr-go:active{transform:scale(.97)}
@media (hover:hover){body.gr .gr-go:hover{background:var(--gr-accent-d)}}
.gr-nofile{background:var(--gr-surface);border:1px dashed var(--gr-stitch);border-radius:var(--gr-radius);padding:14px 16px}
.gr-nofile b{font:400 19px var(--gr-font-head)}
.gr-nofile p{margin:4px 0 0;color:var(--gr-muted);font-size:14px}
.gr-nofile--photo{border-style:solid;border-color:var(--gr-line);box-shadow:inset 4px 0 0 var(--gr-accent)}

/* реклама: то же, что сейчас, на своём месте */
.gr-hero__side .vk-ad--after_files{margin:16px 0 0}
body.gr .vk-ad--feed{margin-top:28px}

/* текст */
body.gr .gr-post .entry-content{max-width:64ch;margin:18px 0 0;padding:0;font-size:16.5px;line-height:1.68;color:#3A2F44}
body.gr .gr-post .entry-content h2,body.gr .gr-post .entry-content h3{font-size:21px;line-height:1.25}
body.gr .gr-post .entry-content strong{font-weight:600;color:var(--gr-ink)}
body.gr .gr-post .entry-content p{margin:0 0 .95em}
body.gr .gr-post .entry-content a{color:var(--gr-accent)}
body.gr .gr-post .entry-content h2,body.gr .gr-post .entry-content h3{font-family:var(--gr-font-head);font-weight:400;color:var(--gr-ink);margin:1.2em 0 .4em;text-align:left}
/* маркеры списков в тексте: стежок вместо квадрата Root */
body.gr .gr-post .entry-content ul{margin:0 0 .8em;padding:0;list-style:none}
body.gr .gr-post .entry-content ul>li{margin:0 0 .25em;padding-left:18px}
body.gr .gr-post .entry-content ul>li::before{content:"×";position:absolute;left:0;top:0;width:auto;height:auto;margin:0;background:none;border-radius:0;color:var(--gr-accent);font-weight:700;line-height:inherit}
.gr-where .gr-chips{margin-top:8px}
body.gr .gr-post .entry-content ul>li{position:relative}
body.gr #toc_container{background:var(--gr-tint);border:0;border-radius:8px;width:auto;max-width:100%;padding:8px 12px;font-size:15px}
.gr-where{margin-top:18px}
body.gr .gr-where__h{font:400 20px var(--gr-font-head);color:var(--gr-ink);margin:0;text-align:left}

/* ниже записи */
body.gr .entry-footer{margin:0;padding:0}
body.gr .entry-footer:empty,body.gr.single-post .entry-meta__comments{display:none}
body.gr .gr-related{max-width:none;margin:32px 0 0;padding:0}
/* «Ещё в рубрике»: ссылки и их порядок задаёт post-context-links; здесь белая плашка, строки с названием и форматом */
body.gr .mzl-more{margin:36px 0 0;padding:0;background:none;border:0;border-radius:0;max-width:none}
body.gr .mzl-more .gr-sec{margin:0 0 12px}
body.gr .mzl-more h2.mzl-more__h{font:400 23px/1.15 var(--gr-font-head);color:var(--gr-ink);margin:0}
body.gr .mzl-more ul{list-style:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 24px;margin:0!important;padding:6px 18px!important;background:var(--gr-surface);border:1px solid var(--gr-line);border-radius:var(--gr-radius)}
body.gr .mzl-more li{margin:0;padding:0;border-bottom:1px dashed var(--gr-line);min-width:0}
body.gr .mzl-more li::before{display:none}
body.gr .mzl-more li a{display:block;padding:10px 0;color:var(--gr-ink);text-decoration:none;font-weight:600;font-size:15px;line-height:1.3;overflow-wrap:anywhere}
body.gr .mzl-more li a small{display:block;margin-top:2px;font-weight:400;font-size:12.5px;color:var(--gr-muted)}
body.gr .mzl-more .mzl-more__all{display:inline-flex;align-items:center;min-height:40px;margin-top:14px;padding:0 18px;border:1.5px solid var(--gr-accent);border-radius:20px;color:var(--gr-accent);font-weight:600;font-size:14px;text-decoration:none}
@media (hover:hover){body.gr .mzl-more li a:hover{color:var(--gr-accent)}body.gr .mzl-more .mzl-more__all:hover{background:var(--gr-tint)}}
@media (min-width:641px){body.gr .mzl-more ul li:nth-last-child(-n+3):nth-child(3n+1),body.gr .mzl-more ul li:nth-last-child(-n+3):nth-child(3n+1)~li{border-bottom:0}}

/* «поделиться» и комментарии: одна строка за пунктирным швом */
body.gr.single-post .gr-share{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:36px 0 0;padding:20px 0 0;text-align:left;border:0;border-top:1px dashed var(--gr-stitch)}
body.gr.single-post .gr-share .b-share__title{font:400 19px var(--gr-font-head);color:var(--gr-ink);margin:0 10px 0 0;padding:0;background:none}
body.gr.single-post .gr-share .b-share__ico{width:40px;height:40px;margin:0;border-radius:50%;background-size:20px;background-position:center;transition:transform .12s var(--gr-ease),filter .15s ease}
@media (hover:hover){body.gr.single-post .gr-share .b-share__ico:hover{filter:brightness(1.1);transform:translateY(-2px)}}
body.gr.single-post .comments-area{max-width:760px;margin:20px 0 0;padding:0}
.gr-comments-toggle{display:inline-flex;align-items:center;min-height:40px;margin:20px 0 0;padding:0 18px;border:1.5px solid var(--gr-line);border-radius:20px;background:var(--gr-surface);font:600 14px var(--gr-font-body);color:var(--gr-ink);cursor:pointer;transition:transform .12s var(--gr-ease),border-color .15s ease}
@media (hover:hover){.gr-comments-toggle:hover{border-color:var(--gr-accent);color:var(--gr-accent)}}
.gr-comments-toggle:active{transform:scale(.97)}
.gr-comments-toggle:focus-visible{outline:2px solid var(--gr-accent);outline-offset:2px}
body.gr.single-post .comments-area .btn,body.gr.single-post .comment-respond .form-submit input{background:var(--gr-accent);border-color:var(--gr-accent);border-radius:20px}

@media (max-width:1023.98px){
  .gr-hero{gap:24px}
  body.gr .gr-post h1.entry-title{font-size:30px}
}
@media (max-width:767.98px){
  body.gr.single-post .site-main{padding-top:6px}
  body.gr.single-post .breadcrumb{margin-bottom:4px}
  /* заголовок, фото, скачивание, реклама, текст: кнопка остаётся на первом экране */
  .gr-hero{display:flex;flex-direction:column;align-items:stretch;gap:0}
  .gr-hero__side{display:contents}
  .gr-hero .entry-header{order:1}
  .gr-hero__media{order:2;width:100%;position:static;margin-top:10px}
  .gr-dl{order:3}
  .gr-hero__side .vk-ad--after_files{order:4}
  body.gr .gr-post .entry-content{order:5}
  .gr-where{order:6}
  body.gr .gr-hero__media .vkwpb_gallery{height:min(100vw,40svh);min-height:240px}
  body.gr .gr-thumb{width:48px;height:48px}
  body.gr .gr-post h1.entry-title{font-size:24px}
  .gr-toolline{order:3}
  body.gr .gr-f__get{min-height:44px;padding:0 12px}
  body.gr .gr-f__get span{display:none}
  body.gr .mzl-more ul{grid-template-columns:minmax(0,1fr);padding:2px 14px!important}
  body.gr .mzl-more li:last-child{border-bottom:0}
}
@media (prefers-reduced-motion:reduce){
  .gr-go,.gr-f__get,.gr-gal__btn,.gr-comments-toggle,.gr-thumb{transition:none}
}
