/* Shared premium presentation: public pages, subscriber library, Mini App and CMS. */
:root{color-scheme:dark;--bg:#0d0d0d;--panel:#151517;--border:#ffffff14;--muted:#96959f;--text:#f4f3f7;--purple:var(--accent,#a391ed);--site-bg:#0d0d0d;--site-panel:#151517;--site-radius:20px;--button-start:#178fab;--button-end:#be4f9e}
body,body.admin-mode{background:var(--site-bg);color:var(--text);font-family:Inter,'Segoe UI',Arial,sans-serif;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font-family:inherit}button,a,input,select,textarea{touch-action:manipulation}a,button{transition:background .18s,border-color .18s,box-shadow .18s,transform .18s}a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #b6a1ff;outline-offset:4px}
body>header{max-width:1440px;padding:22px 4%;gap:26px;min-height:96px;border-bottom:1px solid var(--border);display:flex}body>header nav{flex:1;justify-content:center;gap:28px;margin:0}header nav a{color:#b7b4c0;font-size:14px}header nav a:hover,header nav a.active{color:#fff}.brand{font-size:24px;letter-spacing:-1.1px}.brand>span:not(.mark){color:#b4a1e8}.mark{background:linear-gradient(135deg,#66c3ed,#926ae5 55%,#d580b7);border-radius:12px;box-shadow:0 0 25px #9163e328;transform:none}.login{order:4;color:#d4d0df;padding:11px 18px;border:1px solid var(--border);border-radius:12px}.subscribe{order:3}
.primary,body .primary,.theme-sample .primary{background:linear-gradient(115deg,var(--button-start),#7960df 48%,var(--button-end));border:1px solid #ffffff20;border-radius:12px;padding:13px 22px;color:#fff;font-weight:650;box-shadow:0 6px 24px #8256be1a;line-height:1.4}.primary:hover{filter:brightness(1.12);box-shadow:0 8px 30px #9c67d22b}.secondary,.filter,.file-button{background:#1c1b20;border:1px solid #ffffff16;color:#c9c6d1;border-radius:11px}.secondary:hover,.filter:hover,.file-button:hover{background:#27232f;border-color:#a88ad84d}.filter.active,.filters .active{background:#a58be51a;border-color:#a58be54a;color:#d6c5ff}
main{max-width:1380px;margin:38px auto 0;padding:0 4%}.layout{grid-template-columns:minmax(0,1fr) 300px;gap:30px}.layout>*,.admin-columns>*,.settings-grid>*{min-width:0}.hero{min-height:420px;padding:40px;border-radius:var(--site-radius);background:#16141e;border:1px solid #ffffff12;box-shadow:0 20px 70px #0003}.hero:after{background:linear-gradient(90deg,#111016eb,#11101688 53%,#11101608),linear-gradient(0deg,#10101450,transparent)}.hero-content{max-width:540px}.hero h1{font-size:clamp(30px,3.7vw,48px);line-height:1.13;letter-spacing:-1.8px;max-width:530px}.hero p{font-size:15px;color:#c3bdce;line-height:1.75}.eyebrow{color:#b8a6db;letter-spacing:2px}.section-heading{margin-top:34px}.section-heading h2,.catalog-head h1{letter-spacing:-1px}.cards{gap:20px}.card,.public-pack,.subscriber-card,.category-card{border:1px solid #ffffff12;border-radius:var(--site-radius);background:var(--site-panel);overflow:hidden;box-shadow:0 12px 34px #0002}.card:hover,.subscriber-card:hover,.category-card:hover{border-color:#a888d846;transform:translateY(-3px);box-shadow:0 16px 35px #0004}.card-image{overflow:hidden}.card-image img,.subscriber-card img,.category-card img{transition:transform .35s}.card:hover .card-image img,.subscriber-card:hover img,.category-card:hover img{transform:scale(1.025)}.card-body{padding:21px}.card h3{font-size:18px;letter-spacing:-.45px;line-height:1.4}.card-body p{color:var(--muted)}.stats{border-color:var(--border);color:#95909f}.tag,.badge{background:#15121ccc;border:1px solid #ffffff20;backdrop-filter:blur(8px);border-radius:8px}
.aside-box{border:1px solid var(--border);background:var(--site-panel);border-radius:var(--site-radius);padding:23px;margin-bottom:22px}.aside-box h2{font-size:17px;letter-spacing:-.3px}.caption{color:var(--muted);font-size:12px}.mini{border-color:var(--border);padding:15px 0;gap:12px}.mini img{border-radius:12px}.rank{color:#a38acb}.subscription-card{border:1px solid #a486d833;border-radius:var(--site-radius);background:radial-gradient(ellipse at 100% 0,#9b4e8922,transparent 60%),linear-gradient(115deg,#14191f,#1c1627 65%,#241723);box-shadow:0 12px 45px #0002;overflow:hidden}.subscription-copy{padding:34px}.subscription-copy h3{font-size:clamp(24px,2.4vw,32px);letter-spacing:-.9px;line-height:1.22}.subscription-copy p{color:#b8afc6;line-height:1.75;max-width:580px}.subscription-sidebar .subscription-copy{padding:24px}.subscription-sidebar h3{font-size:24px}.subscription-card .primary{min-height:48px}.subscription-card.subscription-background .subscription-copy{background:linear-gradient(90deg,#101017e8,#10101780)}
.catalog-head{padding:20px 0 30px}.catalog-head h1{font-size:clamp(32px,4vw,46px);line-height:1.15}.catalog-head p{color:var(--muted);max-width:640px}.public-pack-grid{gap:24px}.pack-hero{border:1px solid var(--border);border-radius:var(--site-radius);background:var(--site-panel);overflow:hidden}.pack-description{padding:36px}.pack-description h1{letter-spacing:-1px;line-height:1.2}.pack-numbers{gap:14px}.pack-numbers>div{background:#ffffff04;border:1px solid var(--border);border-radius:14px}.crumb,.cms-back{color:#aaa0ba}.article-body{font-size:16px;line-height:1.9;color:#c1bdca}.article-body h2{color:#f1edf6;letter-spacing:-.7px}.article-body blockquote{background:#a28acf0c;border-left-color:#ac8ee0;border-radius:0 16px 16px 0;padding:24px}.article-body img,.article-body video{border-radius:16px}.article-actions{border-color:var(--border)}.article-actions button{border-color:var(--border);border-radius:10px;background:#17151b}
.library-top{border-bottom:1px solid var(--border);padding-bottom:22px}.demo-strip{background:#a38bff09;color:#a49cad;border:1px solid #a38bff20;border-radius:12px;padding:12px 16px}.library-search{background:#17151b;border:1px solid #ffffff16;border-radius:12px}.library-search input{color:#eee;background:transparent}.library-subnav{gap:12px}.category-grid,.pack-cards{gap:24px}.category-card{position:relative}.subscriber-card{background:var(--site-panel)}.subscriber-card h3{letter-spacing:-.4px}.pagination{gap:9px}.pagination a,.pagination button{background:#19171e;border:1px solid var(--border);border-radius:10px}.pagination .active{background:#9c78d626;border-color:#9877c754}.subscriber-head{background:var(--site-panel);border:1px solid var(--border);border-radius:var(--site-radius);padding:28px;margin:26px auto}.subscriber-head h1{font-size:clamp(26px,4vw,36px);letter-spacing:-1px}.pack-reading-feed{max-width:940px;margin:0 auto}.media-album{background:var(--site-panel);border:1px solid var(--border);border-radius:var(--site-radius);padding:14px;margin-bottom:28px;overflow:hidden}.album-caption{padding:3px 5px 13px;color:#b3a9c1}.album-grid{border-radius:12px;overflow:hidden;gap:4px}.album-photo-tile,.album-video-tile{background:#19171f}.album-lightbox{background:#0d0c10;border-color:#ffffff1a}.viewer-top{border-bottom:1px solid var(--border)}
footer{border-color:var(--border);color:var(--muted);margin-top:65px;padding-top:30px}.mobile-nav{background:#111014ed;backdrop-filter:blur(20px);border-color:var(--border)}.mobile-nav a{color:#aaa2b7}.mobile-nav a.active{color:#cbb0ff}.ad-banner{border-radius:var(--site-radius);border:1px solid #ffffff14;background:#151219;overflow:hidden}.ad-video-link{background:linear-gradient(115deg,var(--button-start),#7960df,var(--button-end));border-radius:12px}
/* CMS uses the same palette and spacing, with denser working controls. */
.admin-layout{grid-template-columns:244px minmax(0,1fr)}.admin-sidebar{background:#111013;border-color:var(--border);padding:30px 22px;overflow-y:auto}.admin-sidebar nav{gap:6px}.admin-sidebar nav a{padding:11px 15px;border-radius:12px;color:#a9a3b6}.admin-sidebar nav a:hover{background:#ffffff05;color:#eee}.admin-sidebar nav a.active{background:linear-gradient(100deg,#418eac20,#8662c424,#bd6baa18);border-color:#ae87d82e;color:#e1d1fa}.admin-side-note{background:#1a161f;border-color:#a787cc20;border-radius:14px}.admin-main{padding:0 38px 64px;max-width:1600px;width:100%;margin:auto}.admin-toolbar{background:#0d0d0def;border-color:var(--border);gap:10px;padding:21px 0;backdrop-filter:blur(18px)}.admin-notice{background:#18141e;border-color:#a58bce22;color:#b5a8c6;border-radius:12px}.admin-page-heading h1{letter-spacing:-1px;font-size:32px}.cms-panel,.admin-preview,.theme-sample,.settings-card{background:var(--site-panel);border:1px solid var(--border);border-radius:18px;box-shadow:0 8px 30px #0001}.cms-panel-body{padding:25px}.cms-panel>summary{padding:21px 24px;border-color:var(--border)}.cms-panel h2{font-size:18px;letter-spacing:-.4px}.admin-preview{padding:24px}.cms-field{color:#c5bece}.cms-field input,.cms-field select,.cms-field textarea,.add-row input,.add-row select,.admin-main input[type=search],.pack-list-search{background:#100f13;border:1px solid #ffffff17;border-radius:10px;color:#eee;padding:11px 13px}.cms-field input:focus,.cms-field textarea:focus,.cms-field select:focus{border-color:#a88ad888;box-shadow:0 0 0 3px #a88ad810}.cms-field textarea{min-height:110px;line-height:1.6}.cms-field small,.cms-help,.admin-preview p{color:#9890a5}.cms-image-field{gap:18px}.cms-image-field>img{border-radius:12px;border:1px solid var(--border)}.cms-list{display:grid;gap:12px}.cms-list-item{border:1px solid var(--border);background:var(--site-panel);border-radius:16px;padding:18px;gap:18px}.cms-list-item:hover{border-color:#a88ad847;background:#1b181f}.cms-list-item img{border-radius:11px}.cms-list-item small{color:#99909f}.status{border-radius:7px;padding:5px 9px;background:#25202c;color:#bdb0ca;font-size:10px}.status.published{background:#58bfa313;color:#89d1b8;border-color:#58bfa32a}.block-number{background:#9e83d519;color:#bfabe3}.block-controls,.editor-block-heading,.pack-editor-toolbar{border-color:var(--border);background:#ffffff02}.move-buttons button,.gallery-thumb button{background:#211c29;border:1px solid #ffffff12;border-radius:8px}.upload-zone,.article-upload-zone,.pack-upload-zone{background:#a483d608;border:1px dashed #a483d644;border-radius:16px}.gallery-thumb,.pack-media-item{background:#17131e;border-color:var(--border);border-radius:12px;overflow:hidden}.danger{background:#bb657010;color:#e89aa6;border:1px solid #bb65702b;border-radius:10px}.theme-sample-card,.preview-stack>div{background:#18151e;border-color:var(--border);border-radius:14px}
dialog{color:#eee;background:#141216;border:1px solid #ffffff20;border-radius:20px;box-shadow:0 35px 100px #0009}dialog::backdrop{background:#050408bd;backdrop-filter:blur(8px)}.article-preview-toolbar,.pack-preview-toolbar{background:#18151d;border-color:var(--border)}.subscription-editor-fields,.subscription-editor-preview{background:#131115;border-color:var(--border)}.preview-device-switch button.active{background:#a98ada24;color:#dcc6ff}.subscription-preview-scroll{background:#09080b;border-radius:12px}#toast{background:#251d30;border:1px solid #aa89d33d;border-radius:12px}
@media(min-width:1600px){.admin-main{padding-left:52px;padding-right:52px}}
@media(max-width:1100px){body>header{gap:16px}body>header nav{gap:18px}.layout{grid-template-columns:minmax(0,1fr) 260px;gap:22px}.admin-layout{grid-template-columns:210px minmax(0,1fr)}.admin-main{padding:0 24px 50px}.hero{padding:30px}.admin-columns{grid-template-columns:minmax(0,1fr)}}
@media(max-width:800px){body>header{padding:18px 5%;gap:12px;justify-content:space-between}body>header nav{order:5;flex-basis:100%;justify-content:flex-start;border-top:1px solid var(--border);padding-top:15px;gap:24px}header .brand{font-size:22px}header .subscribe{margin-left:auto;padding:10px 14px;font-size:12px}header .login{padding:9px 12px;font-size:12px}.layout{grid-template-columns:minmax(0,1fr)}main{padding:0 5%;margin-top:24px}.hero{min-height:370px;padding:28px}.hero h1{letter-spacing:-1px}.layout>aside{display:grid;grid-template-columns:1fr 1fr;gap:18px}.aside-box{margin:0}.subscription-copy{padding:27px}.admin-layout{display:block}.admin-sidebar{height:auto;position:relative;padding:20px}.admin-sidebar nav{flex-direction:row;overflow-x:auto;flex-wrap:nowrap;margin-top:8px;gap:6px;padding-bottom:6px}.admin-sidebar nav a{white-space:nowrap;flex-shrink:0}.admin-side-note{display:none}.admin-main{padding:0 20px 45px}.admin-toolbar{position:relative}.admin-page-heading{flex-wrap:wrap}.subscriber-head{padding:22px}.pack-description{padding:25px}}
@media(max-width:560px){.brand .mark{width:29px;height:29px;font-size:23px;margin-right:7px}.brand{font-size:20px}.hero{min-height:355px;padding:24px}.hero h1{font-size:33px}.hero p{font-size:14px}.hero:after{background:linear-gradient(90deg,#111016df,#11101650),linear-gradient(0deg,#11101666,transparent)}.layout>aside{display:block}.aside-box{margin-bottom:18px}.cards,.public-pack-grid,.pack-cards,.category-grid{gap:16px}.card-body{padding:19px}.subscription-copy{padding:24px}.subscription-copy h3{font-size:27px}.subscription-copy .primary{width:100%}.catalog-head{padding:14px 0 22px}.catalog-head h1{font-size:34px}.media-album{padding:7px;margin-bottom:20px;border-radius:16px}.album-caption{padding:6px 5px 12px}.subscriber-head{padding:20px}.cms-panel-body{padding:18px}.cms-panel>summary{padding:17px}.cms-list-item{padding:13px;gap:12px}.admin-main{padding:0 14px 40px}.admin-toolbar .primary,.admin-toolbar .secondary{padding:10px 12px}.admin-toolbar>span{flex-basis:100%;max-width:none}.admin-preview{padding:18px}.cms-image-field{flex-wrap:wrap}.admin-page-heading h1{font-size:27px}.mobile-nav{padding-bottom:env(safe-area-inset-bottom)}footer{margin-bottom:85px}header .subscribe{font-size:11px;max-width:145px}header .login{font-size:11px;padding:8px}.subscription-editor-fields{padding:18px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Match specificity of existing configurable presentation rules. */
body:not(.admin-mode) .primary{background:linear-gradient(115deg,var(--button-start),#7960df 48%,var(--button-end));border-color:#ffffff20}
.subscription-card .subscription-copy{padding:34px}.subscription-card h3{font-size:clamp(24px,2.4vw,32px);line-height:1.22;letter-spacing:-.9px}.subscription-card p{font-size:14px;color:#b8afc6}.subscription-sidebar .subscription-copy{padding:24px}.subscription-sidebar h3{font-size:24px}.pack-numbers>span{background:#ffffff04;border:1px solid var(--border);padding:15px 20px;border-radius:14px}
@media(max-width:560px){.subscription-card .subscription-copy{padding:24px}.subscription-card h3{font-size:26px}}

/* Approved wordmark; custom owner logos and renamed brands retain their settings. */
.brand .brand-wordmark{display:block;width:260px;height:auto;max-width:100%;object-fit:contain;margin:-18px -24px;flex-shrink:1}
.admin-sidebar .brand .brand-wordmark{width:220px;margin:-14px -18px;max-width:calc(100% + 36px)}
.theme-sample .brand .brand-wordmark{width:220px;margin:-14px -18px}
@media(max-width:560px){.brand .brand-wordmark{width:190px;margin:-12px -18px}.admin-sidebar .brand .brand-wordmark{width:220px}body>header .brand{min-width:0}}

/* Main public navigation and neutral category tiles. */
#public-menu-toggle{display:none}header #public-menu a.active{color:#dec5ff;background:#a879ed18;border-radius:11px}header #public-menu a{padding:10px 12px}body>header #public-menu{gap:4px}body>header .subscribe{background:linear-gradient(115deg,#7651cd,#b44d95)}
.public-topics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}.public-topic{position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;min-height:290px;padding:26px;border-radius:20px;border:1px solid #ffffff18;background:radial-gradient(ellipse at 90% 10%,var(--topic-color),transparent 80%),#17131f;transition:transform .2s,border-color .2s}.public-topic:hover{transform:translateY(-3px);border-color:#a78cce88}.public-topic:before{content:'';position:absolute;width:90%;aspect-ratio:1;right:-25%;top:10%;border:1px solid #ffffff26;border-radius:50%;box-shadow:0 0 0 22px #ffffff04,0 0 0 44px #ffffff03;z-index:-1}.topic-number{display:flex;justify-content:space-between;color:#ffffff80}.public-topic h2{font-size:21px;line-height:1.3;margin-top:45px}.public-topic p{font-size:13px;line-height:1.8;color:#c9c3d3}.topic-feed{margin-top:25px}.subscription-benefits{display:grid;grid-template-columns:repeat(4,1fr);gap:15px}.subscription-benefits span{padding:18px;border:1px solid #ffffff12;border-radius:14px;background:#17141c}body>.mobile-nav{display:none}
@media(max-width:1100px){body>header{gap:12px}body>header .brand-wordmark{width:215px}header #public-menu a{padding:9px}}
@media(max-width:900px){body>header{display:grid;grid-template-columns:1fr auto auto;gap:12px}body>header>.brand{grid-column:1/3}#public-menu-toggle{display:block;grid-column:3;grid-row:1;width:42px;height:42px;border:1px solid #ffffff20;border-radius:11px;font-size:22px}body>header .subscribe{grid-column:1/3;grid-row:2;margin:0}body>header .login{grid-column:3;grid-row:2;margin:0}body>header #public-menu{display:none;grid-column:1/-1;grid-row:3;padding-top:12px;border-top:1px solid #ffffff14;width:100%}body>header.menu-open #public-menu{display:grid;grid-template-columns:1fr 1fr}header #public-menu a{padding:13px}.public-topics{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.public-topic{padding:20px;min-height:250px}.subscription-benefits{grid-template-columns:1fr 1fr}}
@media(max-width:560px){body>header .subscribe{max-width:none;font-size:13px}.public-topic{padding:17px;min-height:255px}.public-topic h2{font-size:18px;overflow-wrap:anywhere}.public-topic p{font-size:12px}.subscription-benefits span{font-size:13px}footer{margin-bottom:0}}

/* Publication media share one two-column grid, including banners between galleries. */
.article-body:not(.about-page){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.article-body:not(.about-page)>*{grid-column:1/-1;min-width:0}
.article-body:not(.about-page)>.article-gallery{display:contents}
.article-body:not(.about-page)>figure,
.article-body:not(.about-page)>.article-gallery>img,
.article-body:not(.about-page)>[data-article-banner]{grid-column:auto;position:relative;width:100%;min-width:0;aspect-ratio:1/1;margin:0;overflow:hidden;border-radius:16px;background:#131116}
.article-body:not(.about-page)>figure>img,
.article-body:not(.about-page)>figure>video,
.article-body:not(.about-page)>.article-gallery>img{display:block;width:100%;height:100%;max-height:none;min-height:0;object-fit:cover;border-radius:16px}
.article-body:not(.about-page)>figure>video{object-fit:contain}
.article-body:not(.about-page)>figure>figcaption{position:absolute;bottom:0;left:0;right:0;margin:0;padding:8px 12px;background:#0d0d0dd9;color:#ddd;font-size:12px;line-height:1.4;max-height:30%;overflow:auto}
.article-body:not(.about-page)>figure>figcaption:empty{display:none}
.article-body:not(.about-page)>figure:has(video)>figcaption{bottom:auto;top:0;pointer-events:none}
.article-body:not(.about-page)>[data-article-banner]:not(:has(.ad-banner)){display:none}
.article-body [data-article-banner]>.ad-banner{width:100%;height:100%;max-width:none;margin:0;border:0;border-radius:16px;position:relative}
.article-body [data-article-banner] .ad-desktop,
.article-body [data-article-banner] .ad-mobile,
.article-body [data-article-banner] .ad-banner a:not(.ad-video-link){width:100%;height:100%}
.article-body [data-article-banner] .ad-banner img,
.article-body [data-article-banner] .ad-banner video{display:block;width:100%;height:100%;max-height:none;min-height:0;object-fit:contain;border-radius:0}
.article-body [data-article-banner] .ad-video-link{position:absolute;top:8px;right:8px;max-width:calc(100% - 16px);padding:8px 12px;z-index:1}
@media(min-width:621px){.article-body>[data-article-banner]:has(.ad-device-mobile){display:none}}
@media(max-width:620px){.article-body>[data-article-banner]:has(.ad-device-desktop){display:none}}
@media(max-width:560px){.article-body:not(.about-page){gap:10px}.article-body:not(.about-page)>figure,.article-body:not(.about-page)>.article-gallery>img,.article-body:not(.about-page)>[data-article-banner]{border-radius:12px}.article-body:not(.about-page)>figure>figcaption{font-size:10px;padding:5px 8px}}
.article-body:not(.about-page)>.article-gallery>img{height:auto;aspect-ratio:1/1;object-fit:cover}

/* Article banners span both media columns, as in the approved placement. */
.article-body:not(.about-page)>[data-article-banner]{grid-column:1/-1;aspect-ratio:16/9}

/* Compact premium callout with editable two-by-two benefits. */
.subscription-card{background:radial-gradient(ellipse at 0 0,#258da810,transparent 65%),linear-gradient(120deg,#141218,#1e1726 65%,#241821);border:1px solid #b291d526;border-radius:24px}
.subscription-card .subscription-copy{padding:26px;gap:12px;width:100%}.subscription-card .subscription-copy>h3{font-size:clamp(23px,2.5vw,30px);line-height:1.2}.subscription-card .subscription-copy>p{font-size:14px;line-height:1.7;margin:0}
.subscription-card .premium-perks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;list-style:none;padding:0;margin:8px 0;width:100%}
.subscription-card .premium-perks li{min-width:0;display:flex;flex-direction:column;gap:10px;padding:15px;border:1px solid #ffffff12;background:#ffffff04;border-radius:14px;line-height:1.5}
.subscription-card .premium-perks svg{width:21px;height:21px;flex-shrink:0;color:#c4a2f5}.subscription-card .premium-perks li:nth-child(2) svg{color:#8dc9e1}.subscription-card .premium-perks li:nth-child(3) svg{color:#dfa4cb}.subscription-card .premium-perks span{font-size:13px;color:#ded8e6;overflow-wrap:anywhere}
body .subscription-card .primary{width:100%;min-height:48px;background:linear-gradient(110deg,#258da8,#805bd0 50%,#b54e99);border-color:#ffffff1a;border-radius:12px;gap:10px}
.subscription-sidebar .subscription-copy{padding:20px}.subscription-sidebar .premium-perks li{padding:10px}.subscription-sidebar .premium-perks span{font-size:11px}.subscription-sidebar .subscription-copy>h3{font-size:24px}
@media(max-width:560px){.subscription-card .subscription-copy{padding:20px}.subscription-card .premium-perks li{padding:12px}.subscription-card .premium-perks span{font-size:12px}}

/* Full article cover: complete image on the left, copy on the right. */
.article-cover{display:grid;grid-template-columns:minmax(0,42%) minmax(0,1fr);min-height:400px;padding:0;gap:0;border:1px solid #ffffff14;border-radius:20px;overflow:hidden;background:var(--site-panel,#151517);margin-bottom:24px}
.article-cover-image{position:relative;min-width:0;min-height:400px;overflow:hidden;background:linear-gradient(145deg,#147e99,#542373 65%,#1b101e);padding:0}
.article-cover .article-cover-image img{position:absolute;inset:0;display:block;width:100%;height:100%;max-height:none;object-fit:cover;object-position:center;border-radius:0}
.article-cover-meta{display:flex;flex-wrap:wrap;gap:12px 18px;align-items:center;color:#bcb5c8;font-size:13px}
.article-cover-meta .feed-stat{display:inline-flex;align-items:center;gap:5px}.article-cover-meta svg{width:17px;height:17px;flex-shrink:0}
.article-cover-copy{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;min-width:0;padding:32px;gap:16px}
.article-cover-copy h1{margin:0;font-size:clamp(26px,3vw,42px);line-height:1.15;letter-spacing:-1px;overflow-wrap:anywhere}
.article-cover-copy p{margin:0;color:#bcb5c8;font-size:15px;line-height:1.7;white-space:pre-line;overflow-wrap:anywhere}
@media(max-width:800px){.article-cover{grid-template-columns:minmax(0,1fr);min-height:0}.article-cover-image{min-height:0;height:clamp(280px,80vw,460px);padding:0}.article-cover-copy{padding:24px;gap:12px}.article-cover-copy h1{font-size:28px}}

/* Compact text-only Premium banner inside posts. */
.post-premium{border-radius:20px;background:radial-gradient(ellipse at 100% 0,#d946ef14,transparent 65%),#121216}
.post-premium .subscription-copy{padding:26px;gap:10px}
.post-premium .subscription-copy>.post-premium-lead{font-size:18px;font-weight:600;color:#f4f4f5;max-width:680px;line-height:1.6}
.post-premium .subscription-copy>p{white-space:pre-line;overflow-wrap:anywhere}
.post-premium .subscription-copy>.primary{margin:8px 0 0;width:fit-content;min-height:48px;background:linear-gradient(105deg,#67e8f9,#a78bfa 55%,#f472b6);color:#09090b;gap:10px}
.post-premium .premium-perks{margin:10px 0 0}
.post-premium .premium-perks li{flex-direction:row;align-items:flex-start;padding:12px;gap:9px;border-radius:12px}
.post-premium .premium-perks svg{width:18px;height:18px;margin-top:2px}
.post-premium .primary:focus-visible{outline:2px solid #67e8f9;outline-offset:4px}
@media(max-width:560px){.post-premium .subscription-copy{padding:20px}.post-premium .subscription-copy>.post-premium-lead{font-size:16px}.post-premium .subscription-copy>.primary{width:100%}.post-premium .premium-perks li{padding:10px;gap:7px}}

/* Fluid advertising cards: height follows copy, not a reserved media slot. */
.article-body:not(.about-page)>[data-article-banner]{aspect-ratio:auto;height:auto;min-height:0}
.ad-banner.promo-banner,.article-body [data-article-banner]>.promo-banner{width:100%;max-width:none;height:auto;min-height:0;border:1px solid #ffffff14;border-radius:20px;background:linear-gradient(115deg,#12303980,#30204780,#42203870),#121216;line-height:1.5}
.article-body [data-article-banner] .ad-desktop,.article-body [data-article-banner] .ad-mobile{height:auto}
.promo-flow{display:flex;flex-wrap:wrap;align-items:center;gap:20px;padding:22px}
.promo-copy{flex:2 1 230px;min-width:0;overflow-wrap:anywhere}
.promo-copy h3{margin:0;font-size:21px;line-height:1.3;color:#fafafa;letter-spacing:-.4px}
.promo-copy p{margin:8px 0 0;font-size:14px;line-height:1.6;color:#b9b3c4;white-space:pre-line}
.ad-banner.promo-banner a.promo-action,.article-body [data-article-banner] .ad-banner a.promo-action{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:auto;height:auto;max-width:100%;margin-top:16px;padding:11px 18px;border-radius:12px;background:linear-gradient(105deg,#67e8f9,#a78bfa 55%,#f472b6);color:#09090b;font-size:14px;font-weight:700;line-height:1.5;text-align:center;overflow-wrap:anywhere}
.promo-action:focus-visible{outline:2px solid #67e8f9;outline-offset:4px}
.promo-previews{display:flex;gap:10px;flex:1 1 150px;min-width:0;align-items:center}
.promo-placeholder{flex:1;padding:40px 0;border:1px solid #ffffff14;border-radius:12px;background:linear-gradient(135deg,#39c5dc77,#8060d866,#271332)}
.promo-placeholder+ .promo-placeholder{background:linear-gradient(135deg,#9473f577,#db559c66,#321323)}
.ad-banner.promo-banner .promo-previews img,.ad-banner.promo-banner .promo-previews video,.article-body [data-article-banner] .promo-previews img,.article-body [data-article-banner] .promo-previews video{display:block;width:100%;height:auto;min-height:0;max-height:none;border-radius:12px;object-fit:contain}
.banner-preview-content{min-height:0;padding:0;border:0;background:transparent}.banner-preview-content .promo-banner{margin:0}.banner-preview-content.vertical img,.banner-preview-content.vertical video{max-width:100%}
@media(max-width:560px){.promo-flow{padding:18px;gap:16px}.promo-copy h3{font-size:19px}}
.ad-banner.promo-banner .promo-previews img,.ad-banner.promo-banner .promo-previews video,.article-body [data-article-banner] .promo-previews img,.article-body [data-article-banner] .promo-previews video{width:auto;max-width:100%;max-height:160px;margin:auto}

/* Consecutive media form independent grids; odd final items fill the row. */
.article-body>.post-media-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;min-width:0;grid-column:1/-1}
.article-body>.post-media-grid>figure{position:relative;margin:0;min-width:0;width:100%;aspect-ratio:4/3;overflow:hidden;border-radius:16px;background:#131116}
.article-body>.post-media-grid>figure:last-child:nth-child(odd){grid-column:1/-1}
.article-body>.post-media-grid>figure>img,.article-body>.post-media-grid>figure>video{display:block;width:100%;height:100%;min-height:0;max-height:none;object-fit:cover;border-radius:inherit}
.article-body>.post-media-grid>figure>video{object-fit:contain}
.article-body>.post-media-grid>figure>figcaption{position:absolute;bottom:0;left:0;right:0;margin:0;padding:8px 12px;background:#0d0d0dd9;color:#ddd;font-size:12px;line-height:1.4;max-height:30%;overflow:auto}
.article-body>.post-media-grid>figure>figcaption:empty{display:none}
.article-body>.post-media-grid>figure:has(video)>figcaption{bottom:auto;top:0;pointer-events:none}
@media(max-width:560px){.article-body>.post-media-grid{gap:10px}.article-body>.post-media-grid>figure{border-radius:12px}}
@media(max-width:399px){.article-body>.post-media-grid{grid-template-columns:minmax(0,1fr)}}

/* Scoped to the public feed; subscriber viewer and CMS keep their styling. */
.cards:has(>.feed-card){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch;min-width:0}
.card.feed-card{position:relative;isolation:isolate;display:flex;flex-direction:column;min-width:0;overflow:hidden;border:1px solid rgba(255,255,255,.06);border-radius:20px;background:#111214;cursor:pointer;transition:transform .3s,box-shadow .35s}
.feed-card::before{content:'';position:absolute;inset:-1px;padding:1.5px;border-radius:inherit;background:linear-gradient(135deg,#0e8fa3,#4b1d8f,#a0125f);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:0;transition:opacity .35s;pointer-events:none;z-index:4}
.feed-card .feed-preview{position:relative;aspect-ratio:3/4;overflow:hidden;border-radius:19px;background:linear-gradient(135deg,#0e8fa3,#4b1d8f 55%,#a0125f)}
.feed-preview::after{content:'';position:absolute;inset:auto 0 0;height:65%;background:linear-gradient(to bottom,transparent,rgba(0,0,0,.85));pointer-events:none}
.feed-card .feed-cover{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;opacity:0;transition:transform .6s cubic-bezier(.2,.7,.2,1),opacity .25s}
.feed-card .feed-cover.is-loaded{opacity:1}
.feed-number,.feed-video-badge{position:absolute;top:12px;z-index:1;display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border-radius:9px;color:#fff;font-size:11px;line-height:1.2;font-weight:700}
.feed-number{left:12px;max-width:55%;overflow:hidden;text-overflow:ellipsis;background:rgba(10,10,12,.6);backdrop-filter:blur(8px)}
.feed-video-badge{right:12px;background:linear-gradient(110deg,#4b1d8f,#a0125f);transition:transform .35s}
.feed-card svg{width:16px;height:16px;flex-shrink:0}
.feed-video-badge svg{width:12px;height:12px;fill:currentColor;stroke:none}
.feed-card .feed-title{position:static;margin:0;color:#fff;font-size:17px;line-height:1.35;font-weight:600;overflow:hidden;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.feed-overlay{position:absolute;inset:auto 0 0;z-index:1;display:flex;flex-direction:column;gap:12px;padding:18px;min-width:0;text-shadow:0 1px 5px #0008;pointer-events:none}
.feed-bottom{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;min-width:0}
.feed-stats{display:flex;flex-wrap:wrap;align-items:center;gap:10px;color:#e0e0e4;font-size:11px;font-variant-numeric:tabular-nums;min-width:0}
.feed-stat{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.feed-card .feed-open{display:inline-flex;align-items:center;gap:5px;margin-left:auto;color:#fff;font-size:12px;font-weight:600;white-space:nowrap}
.feed-open svg{transition:transform .35s}
.feed-stretched-link{position:absolute;inset:0;z-index:2;border-radius:inherit}
.feed-stretched-link:focus-visible{outline:3px solid #73e4ed;outline-offset:4px}
.feed-card:has(.feed-stretched-link:focus-visible)::before{opacity:1}
/* Future independent actions sit above the stretched link. */
.feed-card button,.feed-card [data-card-action]{position:relative;z-index:3}
#app .filters{display:flex;gap:8px;max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding:4px 0 12px}
#app .filters .filter{flex:0 0 auto;white-space:nowrap;border-radius:999px;padding:8px 14px}
.feed-card.is-pending:not(.is-visible){opacity:0;translate:0 12px}
.feed-card.is-pending.is-visible{animation:feed-reveal .5s ease both;animation-delay:var(--reveal-delay,0ms)}
.card.feed-card:focus-within{opacity:1;translate:none;animation:none}
@keyframes feed-reveal{from{opacity:0;translate:0 12px}to{opacity:1;translate:0 0}}
@media(hover:hover){
 .card.feed-card:hover{transform:translateY(-6px);box-shadow:0 14px 30px rgba(75,29,143,.35);border-color:rgba(255,255,255,.06)}
 .feed-card:hover::before{opacity:1}
 .feed-card:hover .feed-cover{transform:scale(1.07)}
 .feed-card:hover .feed-video-badge{transform:scale(1.08)}
 .feed-card:hover .feed-open svg{transform:translateX(5px)}
}
@media(hover:none){.feed-card:hover .feed-cover{transform:none}.card.feed-card:hover{transform:none}.card.feed-card:active{transform:scale(.98)}}
@media(min-width:768px){.cards:has(>.feed-card){grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}}
@media(min-width:1280px){.cards:has(>.feed-card){grid-template-columns:repeat(4,minmax(0,1fr))}}
.home-layout{align-items:start}.home-layout>.home-main{min-width:0}.home-layout .cards:has(>.feed-card){grid-template-columns:repeat(2,minmax(0,1fr))}
@media(min-width:801px){.home-layout{grid-template-columns:minmax(0,1fr) 300px}.home-layout>.home-main>.hero{min-height:460px}.home-layout>aside{display:block}}
@media(max-width:599px){.feed-overlay{padding:12px;gap:9px}.feed-stats{gap:6px;font-size:11px}.feed-card .feed-title{font-size:15px}.feed-number,.feed-video-badge{top:8px;padding:5px 6px;font-size:9px}.feed-number{left:8px}.feed-video-badge{right:8px}}
@media(max-width:359px){.cards:has(>.feed-card),.home-layout .cards:has(>.feed-card){grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){
 .card.feed-card,.feed-card *,.feed-card::before,.feed-card::after{animation:none!important;transition:none!important}
 .card.feed-card,.card.feed-card:hover,.card.feed-card:active{opacity:1!important;translate:none!important;transform:none!important}
 .feed-card:hover .feed-cover,.feed-card:hover .feed-video-badge,.feed-card:hover .feed-open svg{transform:none!important}
}

/* Bright horizontal before/after banner with purely abstract previews. */
.ad-banner.promo-banner:has(.comparison-flow){border:1px solid #ffffff25;border-radius:24px;background:linear-gradient(100deg,#020617bd,#02061733 70%,transparent),linear-gradient(125deg,#22d3ee,#7c3aed 55%,#ec4899);box-shadow:0 16px 50px #8b5cf633}
.comparison-flow{display:flex;flex-wrap:wrap;align-items:center;gap:28px;padding:30px}
.comparison-copy{flex:3 1 260px;min-width:0;overflow-wrap:anywhere}
.comparison-copy h3{margin:0;font-size:clamp(28px,3vw,40px);font-weight:750;line-height:1.12;letter-spacing:-1px;color:#fff;white-space:pre-line}
.comparison-copy p{margin:14px 0 0;color:#fffffff2;font-size:16px;line-height:1.6;white-space:pre-line}
.comparison-copy small{display:block;margin-top:12px;color:#ffffffc7;font-size:12px;line-height:1.6;white-space:pre-line}
.comparison-previews{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;flex:2 1 240px;min-width:0}
.comparison-previews figure{position:relative;aspect-ratio:1/1;min-width:0;margin:0;overflow:hidden;border:1px solid #ffffff45;border-radius:16px;background:linear-gradient(135deg,#64748b99,#1e1b4b99,#020617);box-shadow:0 8px 20px #0002}
.comparison-previews .comparison-after{background:linear-gradient(135deg,#67e8f9,#8b5cf6,#f472b6);border-color:#ffffff77}
.comparison-previews figure>div{position:absolute;left:15%;top:15%;width:65%;height:65%;transform:rotate(12deg);border:1px solid #ffffff40;border-radius:25%;background:#ffffff0d}
.comparison-previews .comparison-after>div{transform:rotate(-12deg);border-color:#ffffff99;background:#ffffff33;box-shadow:0 0 30px #fff3}
.comparison-previews figcaption{position:absolute;left:10px;bottom:10px;margin:0;padding:6px 12px;border:1px solid #ffffff30;border-radius:8px;background:#020617b3;color:#fff;font-size:12px;font-weight:600;line-height:1.4;backdrop-filter:blur(8px)}
@media(max-width:560px){.comparison-flow{padding:20px;gap:20px}.comparison-copy h3{font-size:28px}.comparison-previews{gap:10px}}

/* Text-only ads, with no reserved media area. */
.text-banner-flow{display:flex;flex-wrap:wrap;align-items:center;gap:16px;padding:20px}
.text-banner-copy{flex:1 1 250px;min-width:0;overflow-wrap:anywhere}
.text-banner-copy h3{margin:0;font-size:18px;line-height:1.4;font-weight:650;color:#fafafa}
.text-banner-copy p{margin:5px 0 0;font-size:14px;line-height:1.6;color:#a9a5b2;white-space:pre-line}
.ad-banner.promo-banner .text-banner-flow>.promo-action,.article-body [data-article-banner] .ad-banner .text-banner-flow>.promo-action{margin-top:0;flex:0 1 auto;min-width:0;white-space:normal}
.ad-banner.promo-banner:has(.text-banner-flow){border-radius:16px;background:linear-gradient(110deg,#141820,#1b1625,#211620);box-shadow:none}
@media(max-width:480px){.text-banner-flow{padding:16px}.ad-banner.promo-banner .text-banner-flow>.promo-action,.article-body [data-article-banner] .ad-banner .text-banner-flow>.promo-action{width:100%}}

/* Uploaded banner media keeps its natural proportions without reserved slots. */
.ad-banner.promo-banner .banner-photo-content,.article-body [data-article-banner] .banner-photo-content{height:auto;line-height:0}
.ad-banner.promo-banner .banner-photo-content>a:not(.promo-action),.article-body [data-article-banner] .banner-photo-content>a:not(.promo-action){display:block;width:100%;height:auto}
.ad-banner.promo-banner .banner-photo-content img,.ad-banner.promo-banner .banner-photo-content video,.article-body [data-article-banner] .banner-photo-content img,.article-body [data-article-banner] .banner-photo-content video{display:block;width:100%;height:auto;max-height:none;min-height:0;object-fit:contain}
.banner-photo-content>.promo-action{line-height:1.5}

#new-category-fields{margin-top:12px;padding:14px;border:1px solid #ffffff14;border-radius:12px;background:#101013}#new-category-fields[hidden]{display:none}.new-category-actions{display:flex;flex-wrap:wrap;gap:8px}.new-category-actions button{min-height:44px}#new-category-status{overflow-wrap:anywhere}
/* Homepage only: shared popular leader above the existing home advertisement slot. */
.layout.home-front{display:block}
.home-front .home-top{display:grid;grid-template-columns:minmax(0,3fr) minmax(240px,1fr);gap:28px;align-items:stretch;margin-bottom:28px}
.home-front .home-top>.hero{min-width:0;min-height:460px;margin:0;background:linear-gradient(135deg,#183347,#382243,#17141e)}
.home-front .home-top>aside{display:block;min-width:0}
.home-front .home-top .hero-content{min-width:0;overflow-wrap:anywhere}
.home-front .home-top .mini{min-width:0}.home-front .home-top .mini>div{min-width:0;overflow-wrap:anywhere}
.home-front>.ad-banner{width:100%;box-sizing:border-box;margin:0 0 28px}
.ad-banner.promo-banner.home-ad-slot .banner-photo-content:has(img){height:240px;overflow:hidden}
.ad-banner.promo-banner.home-ad-slot .banner-photo-content:has(img)>a:not(.promo-action){height:100%}
.ad-banner.promo-banner.home-ad-slot .banner-photo-content img{height:100%;object-fit:cover;object-position:center}
@media(max-width:620px){.ad-banner.promo-banner.home-ad-slot .banner-photo-content:has(img){height:160px}}
.home-front>.home-main{min-width:0}
.home-skeleton-line{display:block;height:1em;min-width:7em;max-width:100%;margin:.55em 0;border-radius:5px;background:#ffffff12}
.home-skeleton-title{height:2.4em}
.home-skeleton .hero-content{width:min(100%,540px)}
.home-skeleton-copy{min-width:0;flex:1;font-size:12px}
.home-skeleton-copy .home-skeleton-line{min-width:0}
.home-skeleton-thumb{width:72px;height:64px;flex-shrink:0;border-radius:12px;background:#ffffff12}
.home-skeleton-block{background:#ffffff08}
@media(max-width:560px){.home-skeleton-thumb{width:77px;height:59px}}
@media(max-width:800px){.home-front .home-top{grid-template-columns:minmax(0,1fr);gap:24px}.home-front .home-top>.hero{min-height:400px}.home-front .home-top>aside{display:block}}

/* Optional subscription device selection; legacy blocks remain visible on both. */
/* Route marker works with both clean URLs and legacy hash navigation. */
body:not(.admin-mode):not(.preview-mode)>header[data-public-route="/subscriptions"]>.subscribe{display:none}
@media(max-width:900px){
 body:not(.admin-mode):not(.preview-mode)>header[data-public-route="/subscriptions"]{grid-template-columns:minmax(0,1fr) 42px;min-height:80px}
 body:not(.admin-mode):not(.preview-mode)>header[data-public-route="/subscriptions"]>.brand{grid-column:1;grid-row:1}
 body:not(.admin-mode):not(.preview-mode)>header[data-public-route="/subscriptions"]>#public-menu-toggle{grid-column:2;grid-row:1}
 body:not(.admin-mode):not(.preview-mode)>header[data-public-route="/subscriptions"]>.subscribe{display:none}
 body:not(.admin-mode):not(.preview-mode)>header[data-public-route="/subscriptions"]>.login{display:none}
 body:not(.admin-mode):not(.preview-mode)>header[data-public-route="/subscriptions"]>#public-menu{grid-row:2;min-width:0}
 body:not(.admin-mode):not(.preview-mode):has(#app>.catalog-head)>header.menu-open[data-public-route="/subscriptions"]>.login{display:inline-flex;grid-column:1/-1;grid-row:3;justify-self:start;width:auto}
}
/* Homepage mobile header only: a compact purchase control beside the logo. */
@media(max-width:900px){
 body:not(.admin-mode):not(.preview-mode):has(#app .home-front)>header{grid-template-columns:minmax(0,1fr) auto 42px;gap:8px;min-height:80px}
 body:not(.admin-mode):not(.preview-mode):has(#app .home-front)>header>.brand{grid-column:1;grid-row:1;min-width:0;white-space:normal;overflow-wrap:anywhere}
 body:not(.admin-mode):not(.preview-mode):has(#app .home-front)>header>.subscribe{grid-column:2;grid-row:1;display:inline-flex;align-items:center;justify-content:center;justify-self:end;width:auto;min-width:0;height:42px;padding:0 12px;margin:0;font-size:0;gap:0;background:linear-gradient(105deg,#67e8f9,#a78bfa 55%,#f472b6)}
 body:not(.admin-mode):not(.preview-mode):has(#app .home-front)>header>.subscribe::after{content:'Подписка';font-size:13px;line-height:1;white-space:nowrap}
 body:not(.admin-mode):not(.preview-mode):has(#app .home-front)>header>.subscribe>*{display:none}
 body:not(.admin-mode):not(.preview-mode):has(#app .home-front)>header>.login{display:none}
 body:not(.admin-mode):not(.preview-mode):has(#app .home-front)>header>#public-menu{grid-row:2;min-width:0}
 body:not(.admin-mode):not(.preview-mode):has(#app .home-front)>header.menu-open>.login{display:inline-flex;grid-column:1/-1;grid-row:3;justify-self:start;width:auto}
}
@media(max-width:360px){
 body:not(.admin-mode):not(.preview-mode):has(#app .home-front)>header>.brand{grid-column:1/3}
 body:not(.admin-mode):not(.preview-mode):has(#app .home-front)>header>.subscribe{grid-column:1/3;grid-row:2;justify-self:start}
 body:not(.admin-mode):not(.preview-mode):has(#app .home-front)>header>#public-menu{grid-row:3}
 body:not(.admin-mode):not(.preview-mode):has(#app .home-front)>header.menu-open>.login{grid-row:4}
}
/* Public article mobile header: purchase stays in the existing expandable menu. */
@media(max-width:900px){
 body:not(.admin-mode):not(.preview-mode):has(#app .article-cover)>header{grid-template-columns:minmax(0,1fr) auto 42px;min-height:80px;gap:10px}
 body:not(.admin-mode):not(.preview-mode):has(#app .article-cover)>header>.brand{grid-column:1;grid-row:1;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
 body:not(.admin-mode):not(.preview-mode):has(#app .article-cover)>header .brand-wordmark{max-width:100%;margin:0}
 body:not(.admin-mode):not(.preview-mode):has(#app .article-cover)>header>.login{grid-column:2;grid-row:1}
 body:not(.admin-mode):not(.preview-mode):has(#app .article-cover)>header>#public-menu{grid-row:2;min-width:0}
 body:not(.admin-mode):not(.preview-mode):has(#app .article-cover)>header>.subscribe{display:none}
 body:not(.admin-mode):not(.preview-mode):has(#app .article-cover)>header.menu-open>.subscribe{display:inline-flex;grid-column:1/-1;grid-row:3;justify-self:start;align-items:center;justify-content:center;width:auto;max-width:100%;min-width:0;height:44px;padding:0 16px;font-size:13px;white-space:normal;background:linear-gradient(105deg,#67e8f9,#a78bfa 55%,#f472b6)}
}
@media(max-width:700px){[data-promo-device="desktop"]{display:none!important}}
@media(min-width:701px){[data-promo-device="mobile"]{display:none!important}}

/* Body photographs retain their intrinsic proportions; covers and banners keep their design. */
.article-body:not(.about-page)>figure:has(>img){aspect-ratio:auto;overflow:visible;background:transparent}
.article-body:not(.about-page)>figure>img,
.article-body:not(.about-page)>.article-gallery>img{display:block;width:100%;height:auto;aspect-ratio:auto;object-fit:contain;max-height:none}
.article-body:not(.about-page)>figure:has(>img)>figcaption{position:static;max-height:none;overflow:visible}
@media(max-width:560px){.article-body:not(.about-page)>figure:has(>img),.article-body:not(.about-page)>.article-gallery>img{grid-column:1/-1}}
.article-body:not(.about-page) .post-media-grid>figure:has(>img){aspect-ratio:auto;overflow:visible;background:transparent}
.article-body:not(.about-page) .post-media-grid>figure>img{display:block;width:100%;height:auto;aspect-ratio:auto;object-fit:contain;max-height:none}
.article-body:not(.about-page) .post-media-grid>figure:has(>img)>figcaption{position:static;max-height:none;overflow:visible}
@media(max-width:560px){.article-body:not(.about-page) .post-media-grid>figure:has(>img){grid-column:1/-1}}
/* Video cards own the reserved 4:5 frame; captions stay below it in every article grid. */
.article-body:not(.about-page) figure.article-video-figure{aspect-ratio:auto;overflow:visible;background:transparent}
.article-body:not(.about-page) figure.article-video-figure>figcaption{position:static;max-height:none;overflow:visible;background:transparent;padding:8px 0;pointer-events:auto}
/* Discovery pages keep the purchase action on its own complete mobile row. */
@media(max-width:560px){
 body:not(.admin-mode):not(.preview-mode):has(#app>.catalog-head)>header>.subscribe{grid-column:1/-1;min-height:44px;width:100%;max-width:100%;padding:10px 16px;text-align:center;line-height:1.4}
 body:not(.admin-mode):not(.preview-mode):has(#app>.catalog-head)>header>.login{grid-column:1/-1;grid-row:4;justify-self:start}
 #app>.public-popular-cards:has(>.feed-card){grid-template-columns:minmax(0,1fr)}
}

/* A portrait cover must keep its complete composition inside the wide home hero.
   Leave the existing mobile crop and the hero's outer geometry unchanged. */
@media(min-width:621px){
 .home-front .home-top>.hero>img{object-fit:contain;object-position:right center}
}

/* Public Telegram chrome: device inset is counted once, then Telegram controls. */
html[data-public-telegram="true"] body:not(.admin-mode):not(.preview-mode):not(.web-viewer){padding-top:calc(max(env(safe-area-inset-top,0px),var(--public-tg-system-top,0px)) + var(--public-tg-content-top,0px))}
/* Ranked popular rows only; preserve desktop and unrelated compact cards. */
@media(max-width:600px){
 body:not(.admin-mode):not(.preview-mode) .aside-box .mini:has(>.rank){display:grid;grid-template-columns:18px 100px minmax(0,1fr);gap:14px;min-height:110px;padding:16px 0;margin-top:18px}
 body:not(.admin-mode):not(.preview-mode) .aside-box .mini:has(>.rank)>img{width:100px;height:78px;object-fit:cover}
 body:not(.admin-mode):not(.preview-mode) .aside-box .mini:has(>.rank)>.rank{width:18px;font-size:20px;font-weight:600;line-height:1.2}
 body:not(.admin-mode):not(.preview-mode) .aside-box .mini:has(>.rank)>div{min-width:0;overflow-wrap:anywhere}
 body:not(.admin-mode):not(.preview-mode) .aside-box .mini:has(>.rank) h3{font-size:14px;line-height:1.45;margin:4px 0 6px}
 body:not(.admin-mode):not(.preview-mode) .aside-box .mini:has(>.rank) small{font-size:12px;line-height:1.5}
 body:not(.admin-mode):not(.preview-mode) .aside-box .mini:has(>.rank) .category{font-size:10px;line-height:1.4;letter-spacing:.3px}
}

/* Public article video groups must not be nested into one photo-grid column.
   Keep surrounding prose/photos at their previous width; only video breaks out. */
body:not(.admin-mode):not(.preview-mode) .article-body:has(.article-video-group){max-width:none;container-type:inline-size}
body:not(.admin-mode):not(.preview-mode) .article-body:has(.article-video-group)>*{width:100%;max-width:740px;justify-self:center}
body:not(.admin-mode):not(.preview-mode) .article-body .article-video-group{grid-column:1/-1;width:min(1100px,100cqw);max-width:none;min-width:0;justify-self:center;container-type:inline-size}
body:not(.admin-mode):not(.preview-mode) .article-body .article-video-grid{grid-template-columns:minmax(0,1fr);gap:20px;width:100%}
body:not(.admin-mode):not(.preview-mode) .article-body .article-video-grid>figure{width:100%;min-width:0;margin:0;grid-column:auto}
body:not(.admin-mode):not(.preview-mode) .article-body .article-video-card{width:100%;min-width:0;aspect-ratio:16/9;border-radius:12px}
body:not(.admin-mode):not(.preview-mode) .article-body .article-video-card>video{width:100%;height:100%;max-width:none;object-fit:contain}
body:not(.admin-mode):not(.preview-mode) .article-body .article-video-card img{width:100%;height:100%;object-fit:contain;border-radius:0}
/* Portrait/square article frames follow their uncropped poster, then video metadata. */
body:not(.admin-mode):not(.preview-mode) .article-body .article-video-card[data-video-ratio]{width:min(100%,calc(80vh * var(--article-video-ratio)));width:min(100%,calc(80svh * var(--article-video-ratio)));aspect-ratio:var(--article-video-ratio);margin-inline:auto}
@container(min-width:840px){body:not(.admin-mode):not(.preview-mode) .article-body .article-video-grid{grid-template-columns:repeat(2,minmax(0,1fr))}body:not(.admin-mode):not(.preview-mode) .article-body .article-video-grid>figure:only-child{grid-column:1/-1}}
.article-video-fullscreen{position:absolute;right:10px;top:10px;z-index:2;display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid #ffffff80;border-radius:8px;background:#080c16d9;color:white;font-size:26px;line-height:1}
.article-video-fullscreen:focus-visible{outline:3px solid #bda2ff;outline-offset:2px}

body:not(.admin-mode):not(.preview-mode) .article-body .post-media-grid>figure.article-video-figure{grid-column:1/-1}

/* Header channel link; purchase controls inside pages remain unchanged. */
body>header>.primary.header-telegram{order:3;display:inline-flex;align-items:center;justify-content:center;gap:8px;background:linear-gradient(115deg,#51416f,#505486 48%,#704c68);color:#fff;white-space:nowrap;flex-shrink:0;text-decoration:none}
body>header>.header-telegram svg{flex-shrink:0}
body>header>.header-telegram:hover{border-color:#c3a4e066}
body>header>.header-telegram:focus-visible{outline:2px solid #fff;outline-offset:3px}
@media(max-width:900px){
 body>header:has(>.header-telegram){grid-template-columns:minmax(0,1fr) auto 42px!important;gap:10px!important}
 body>header:has(>.header-telegram)>.brand{grid-column:1/3!important;grid-row:1!important}
 body>header:has(>.header-telegram)>#public-menu-toggle{grid-column:3!important;grid-row:1!important}
 body>header:has(>.header-telegram)>.header-telegram{grid-column:1/3;grid-row:2;justify-self:end;margin:0;padding:10px 14px;font-size:13px;min-height:42px}
 body>header:has(>.header-telegram)>.login:not([hidden]){display:inline-flex!important;align-items:center;justify-content:center;grid-column:3!important;grid-row:2!important;justify-self:stretch!important;margin:0}
 body>header:has(>.header-telegram)>#public-menu{grid-row:3!important}
}
