:root{--st-glass:rgba(18,18,20,.48);--st-glass-dialog:rgba(22,22,25,.62);--st-glass-line:rgba(255,255,255,.17);--st-blur:24px;--st-ease:cubic-bezier(.22,.68,.22,1);--st-duration:.42s}
/* Shared surface treatment, without changing each page's geometry. */
body :is(.glass-btn,.glass-group,.tag-item,.action-group,.st-account,.ph-card,.ph-card-unit:has(>.ph-top-badge),.ph-search,.ph-tabs,.ph-kind-picker,.ph-tag-card,.ph-account-stats,.ph-detail-page,.ph-file-field,.ph-sort select,.ph-field input,.ph-field textarea,.te-media,.te-type-wrap,.te-tabs,.customer-chat-header,.customer-composer){background:var(--st-glass)!important;backdrop-filter:blur(var(--st-blur)) saturate(135%)!important;-webkit-backdrop-filter:blur(var(--st-blur)) saturate(135%)!important;transition:background var(--st-duration) var(--st-ease),border-color var(--st-duration) var(--st-ease),box-shadow var(--st-duration) var(--st-ease)}
body .ph-card-unit:has(>.ph-top-badge)>.ph-card{background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
body :is(.ph-dialog,#te-dialog,#te-watch,.support-notify-dialog){background:var(--st-glass-dialog)!important;backdrop-filter:blur(var(--st-blur)) saturate(135%)!important;-webkit-backdrop-filter:blur(var(--st-blur)) saturate(135%)!important;border:1px solid var(--st-glass-line);box-shadow:0 20px 70px #0005,inset 0 1px 0 #ffffff08;border-radius:36px}
body :is(.ph-dialog,#te-dialog,#te-watch,.support-notify-dialog)::backdrop{background:rgba(0,0,0,.24);backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px)}
body :is(.ph-dialog,#te-dialog,#te-watch,.support-notify-dialog)[open]{animation:st-surface-in .65s ease both}
body :is(.ph-dialog,#te-dialog,#te-watch,.support-notify-dialog)[open]::backdrop{animation:st-backdrop-in .6s ease both}
body :is(.ph-dialog,#te-dialog,#te-watch,.support-notify-dialog)[open].st-closing::backdrop{animation:st-backdrop-out .6s ease both}
body .ph-grid :is(.ph-card,.ph-empty,.ph-small-empty){animation:none!important}
body .te-media{animation:none}
.te-artwork::after{display:none!important}.te-artwork{background:transparent!important}

/* The shell stays put while its contents scroll or change. */
body #te-dialog{height:min(580px,78dvh);max-height:calc(100dvh - 24px);overflow:hidden;padding:18px;inset:0;margin:auto}
#te-dialog[open]{display:flex;flex-direction:column;gap:0}#te-dialog>header,#te-dialog>.te-tabs{flex:none}
.te-dialog-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-top:10px;overflow-anchor:none}
#te-dialog #te-status{height:24px;min-height:24px;padding:4px 0;margin:0;line-height:16px}
#te-dialog #te-status[hidden]{display:block!important;visibility:hidden}
#te-dialog #te-list{margin-top:0;align-content:start;transition:opacity .3s ease,filter .3s ease}
#te-dialog #te-list[aria-busy=true]{opacity:.3;filter:blur(4px);pointer-events:none}
body #ph-dialog{height:min(640px,80dvh);max-height:calc(100dvh - 24px);inset:0;margin:auto;width:calc(100% - 24px);overflow:auto}
body #te-watch{height:min(520px,75dvh);max-height:calc(100dvh - 24px);overflow:hidden}
#te-watch[open]{display:flex;flex-direction:column}#te-watch-close{flex:none}#te-watch-content{flex:1;min-height:0;display:grid;place-items:center;overflow:hidden}
#te-watch-content>img,#te-watch-content>video{width:100%;height:100%;max-height:100%;object-fit:contain}
#te-preview{height:170px;display:grid;place-items:center}#te-preview>*{height:100%;max-height:170px;object-fit:contain;margin:0}
#te-preview>audio{height:42px}
body .ph-detail-media.ph-kind-image>img,body .ph-detail-media.ph-kind-combo>img{height:clamp(160px,28dvh,260px);object-fit:contain;width:100%}
body .ph-detail-media.ph-kind-video>video{height:clamp(130px,25dvh,230px);object-fit:contain}
body :is(.ph-empty,.ph-small-empty){padding:18px 10px;border:0;background:none;border-radius:0;text-align:center;color:#aaa;box-shadow:none;backdrop-filter:none}
body .ph-empty h2{font-size:17px}body .ph-empty p{margin:5px 0;font-size:13px}body .ph-empty a{display:inline-block;margin-top:8px;color:#ddd;text-decoration:underline;text-underline-offset:4px;font-size:14px}
.ph-grid{transition:opacity .3s ease,filter .3s ease}.ph-grid[aria-busy=true]{filter:blur(4px)}
.st-feed-viewport{overflow-anchor:none;min-width:0;overflow:clip;transition:height .42s var(--st-ease)}
/* Separate blur and darkness so opaque black cannot hide the entire blur transition. */
#transition-overlay{background:transparent!important;opacity:1!important;visibility:visible;isolation:isolate;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);transition:backdrop-filter .28s ease,-webkit-backdrop-filter .28s ease!important}
#transition-overlay::before{content:"";position:absolute;inset:0;background:#000;opacity:1;z-index:-1;transition:opacity .24s ease .1s}
#transition-overlay .transition-brand{opacity:1;transition:opacity .24s ease .1s}
#transition-overlay.hidden{opacity:1!important;visibility:visible!important;pointer-events:none;backdrop-filter:blur(0);-webkit-backdrop-filter:blur(0);transition:backdrop-filter .35s ease .1s,-webkit-backdrop-filter .35s ease .1s!important}
#transition-overlay.hidden::before{opacity:0;transition:opacity .28s ease}
#transition-overlay.hidden .transition-brand{opacity:0;transition:opacity .25s ease}
/* Keep ancestors of glass surfaces free of animated opacity/filter: they change backdrop sampling. */
body>.app-container,body>.main-container,body>.ph{filter:none;opacity:1}

.ph-filters .ph-section-heading{height:48px;min-height:48px}
.ph-filters .ph-section-heading h2{white-space:nowrap;font-size:clamp(16px,4.6vw,20px)}
body .ph-grid[aria-busy=true]{filter:none;opacity:1;transition:none}
body .ph-grid{transition:none}

#transition-overlay .transition-logo{display:block!important}
@keyframes st-surface-in{from{opacity:0}to{opacity:1}}
@keyframes st-backdrop-in{from{background:rgba(0,0,0,0);backdrop-filter:blur(0);-webkit-backdrop-filter:blur(0)}to{background:rgba(0,0,0,.24);backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px)}}
@keyframes st-backdrop-out{from{background:rgba(0,0,0,.24);backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px)}to{background:rgba(0,0,0,0);backdrop-filter:blur(0);-webkit-backdrop-filter:blur(0)}}
@media(prefers-reduced-motion:reduce){body :is(.ph-dialog,#te-dialog,#te-watch,.support-notify-dialog,.ph-card,.ph-empty,.te-media),body dialog::backdrop{animation:none!important;transition:none!important}#transition-overlay,.ph-grid,#te-list,.st-feed-viewport{transition:none!important;filter:none!important}}

@media(prefers-reduced-motion:reduce){body>.app-container,body>.main-container,body>.ph{transition:none!important;filter:none!important;opacity:1!important}}

.transition-logo-pulse{display:block;animation:pulseLogo 1s ease-in-out infinite alternate}
@media(prefers-reduced-motion:reduce){.transition-logo-pulse{animation:none}}

@media(prefers-reduced-motion:reduce){#transition-overlay,#transition-overlay.hidden,#transition-overlay::before,#transition-overlay .transition-brand{transition:none!important}}

/* Keep the transition compositor layer alive at zero blur; hiding it caused a final flash. */
#transition-overlay{will-change:backdrop-filter}
/* Editor surfaces stay readable above the animated background. */
.auth-card.te-editor-card{background:rgba(18,18,20,.46);border-color:#ffffff24;backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px)}
body .te-editor-card :is(.te-media,.glass-btn,.action-group){background:rgba(0,0,0,.4)!important;border-color:#ffffff24;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
body .te-editor-card .te-type-wrap{position:relative;height:46px;flex:none;overflow:visible;background:transparent!important;border:0;border-radius:25px;z-index:30;box-shadow:none;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.te-editor-card .te-type-wrap::before{content:"";position:absolute;inset:0 0 auto;height:46px;box-sizing:border-box;border:1px solid #ffffff30;border-radius:25px;background:rgba(0,0,0,.62);backdrop-filter:blur(24px) saturate(145%);-webkit-backdrop-filter:blur(24px) saturate(145%);box-shadow:inset 0 1px 0 #ffffff08;transition:height .32s ease,box-shadow .32s ease}
.te-editor-card .te-type-wrap.is-expanded::before{height:150px;box-shadow:0 12px 30px #0004,inset 0 1px 0 #ffffff08}
.te-editor-card .te-type-wrap #te-type{position:relative;z-index:1;height:46px;min-height:46px;padding:4px 17px 0;color:#f5f5f5;background:transparent;font-size:19px}
.te-editor-card #te-type-menu{position:absolute;inset:46px 0 auto;z-index:1;display:block;grid-template-rows:none;height:auto;overflow:hidden;padding:6px;border:0;border-radius:0 0 25px 25px;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-4px);transform-origin:top center;transition:opacity .24s ease,transform .32s ease,visibility .32s}
.te-editor-card .te-type-wrap.is-expanded #te-type-menu{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0)}
.te-editor-card #te-type-menu>.te-type-options{padding:0;overflow:visible;transform:none}
.te-editor-card #te-type-menu button{height:44px;min-height:44px;padding:3px 13px 0;gap:11px;color:#bfbfc4;background:transparent;border:0;border-radius:999px;transition:background .25s,color .25s}
.te-editor-card #te-type-menu button+button{margin-top:4px}.te-editor-card #te-type-menu button:last-child{margin-bottom:0}
.te-editor-card #te-type-menu button[aria-pressed=true]{color:#fff;background:rgba(255,255,255,.1)}
.te-editor-card #te-type-menu button[aria-pressed=true] i{color:#ff181f}
.te-editor-card #te-type-menu button[aria-pressed=true]::after{content:"";width:6px;height:6px;margin-left:auto;border-radius:50%;background:#ff181f}
.te-editor-card #te-type-menu button:hover{background:rgba(255,255,255,.13);color:#fff}
@media(prefers-reduced-motion:reduce){.te-editor-card #te-type-menu{transition:none}}

body .te-editor-card .te-media button{background:rgba(0,0,0,.4);border-color:#ffffff30}
@media(prefers-reduced-motion:reduce){.te-editor-card .te-type-wrap::before{transition:none}}

.te-editor-card .action-group-body.te-accordion{display:block;max-height:none;padding:0;height:0;opacity:0;transition:height .46s cubic-bezier(.25,.1,.25,1),opacity .4s ease}
.te-editor-card .action-group-body.te-accordion.open{max-height:none;padding:0;opacity:1}
.te-accordion-content{display:flex;flex-direction:column;gap:8px;padding:0 15px 15px;min-width:0}
#detonateWrapper .te-accordion-content{align-items:center;justify-content:center}
.video-btn>.video-btn-cover{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0}
.video-btn::after{content:"";position:absolute;inset:0;background:#0006;z-index:1;pointer-events:none}
:is(.te-artwork,.ph-detail-media,.ph-card-visual,#te-preview,#te-watch-content)[data-media-state]{position:relative}
:is(.te-artwork,.ph-detail-media,.ph-card-visual,#te-preview,#te-watch-content)[data-media-state]::before{content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:3;width:92px;height:20px;box-sizing:border-box;border:0;border-radius:999px;background:rgba(255,255,255,.055);backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px);pointer-events:none;opacity:1;transition:opacity .35s ease}
:is(.te-artwork,.ph-detail-media,.ph-card-visual,#te-preview,#te-watch-content)[data-media-state]::after{content:"";display:block!important;position:absolute;inset:auto;left:50%;top:50%;transform:translate(-50%,-50%);z-index:4;width:72px;height:3px;border:0;border-radius:999px;box-shadow:none;background:linear-gradient(90deg,#ffffff18 0%,#ffffff18 30%,#ffffffb3 50%,#ffffff18 70%,#ffffff18 100%);background-size:220% 100%;animation:st-loading-line 1.5s ease-in-out infinite;pointer-events:none;opacity:1;transition:opacity .35s ease}
:is(.te-artwork,.ph-detail-media,.ph-card-visual,#te-preview,#te-watch-content)[data-media-state=ready]::before,:is(.te-artwork,.ph-detail-media,.ph-card-visual,#te-preview,#te-watch-content)[data-media-state=ready]::after{opacity:0}
:is(.te-artwork,.ph-detail-media,.ph-card-visual,#te-preview,#te-watch-content)[data-media-state=error]::before{content:"Не удалось загрузить";width:auto;height:auto;padding:8px 12px;color:#bbb;white-space:nowrap;font:12px 'Intro Cond Black',sans-serif}
:is(.te-artwork,.ph-detail-media,.ph-card-visual,#te-preview,#te-watch-content)[data-media-state=error]::after{display:none!important}
@keyframes st-loading-line{0%,100%{background-position:100% 0}50%{background-position:0 0}}
@media(prefers-reduced-motion:reduce){:is(.te-artwork,.ph-detail-media,.ph-card-visual,#te-preview,#te-watch-content)[data-media-state]::after{animation:none}}
/* Publication content shares the editor's compact controls and spacing. */
.ph-card-info>:is(h3,.ph-author,.ph-card-actions),.ph-card-visual>.ph-preview,.ph-top-badge,.ph-detail>:not(.ph-detail-overview),.ph-detail-overview>:not(.ph-detail-media){animation:st-content-in .6s ease both}
.ph-card .ph-card-actions{animation-delay:.08s}
.ph-card .ph-preview{background:rgba(0,0,0,.4);border-color:#ffffff30}
.ph-card .ph-preview svg{stroke-width:2.2}
.ph-card:not(.ph-card-audio) .ph-card-info{padding-top:9px;padding-bottom:5px}
.ph-grid-top .ph-card:not(.ph-card-audio) .ph-card-info{padding:0}
.ph-dialog .ph-detail h1{font-size:25px}.ph-dialog .ph-detail .ph-eyebrow{margin-bottom:5px}
.ph-dialog .ph-detail-social{gap:6px;margin:10px 0}
.ph-dialog .ph-detail-social :is(.ph-icon,.ph-button){height:40px;min-height:40px;background:#0006;border-color:#ffffff28}
.ph-detail-player{display:flex;align-items:center;gap:10px;padding:8px;background:#0006;border-radius:999px;border:1px solid #ffffff24;margin:9px 0 0}
.ph-detail-player button{display:grid;place-items:center;flex:none;width:40px;height:40px;border:1px solid #ffffff30;border-radius:50%;background:#ffffff08;color:#fff;cursor:pointer}
.ph-detail-player input{flex:1;min-width:0;width:0;accent-color:#ff181f;height:4px;margin-right:8px}
.ph-detail-media:has(.ph-detail-player){background:transparent;border:0;overflow:visible}
.ph-detail-media:has(.ph-detail-player)>img{border-radius:28px}
.ph-detail-player~audio{display:none}
@keyframes st-content-in{from{opacity:0;filter:blur(4px)}to{opacity:1;filter:blur(0)}}
@media(prefers-reduced-motion:reduce){.te-editor-card .action-group-body.te-accordion{transition:none}.ph-card-info>*,.ph-card-visual>.ph-preview,.ph-top-badge,.ph-detail>*,.ph-detail-overview>*{animation:none!important}}

/* One small offset below the shared 70px header. */
body .main-container:has(>.auth-card),body .main-container:has(>.bento-section){padding-top:84px!important;justify-content:flex-start!important}
body .main-container>.auth-card{margin-top:0!important}
body .app-container .main-container:has(>.auth-card){padding-top:14px!important}
.te-editor-card .te-media{padding:8px}
.te-editor-card .te-picture{grid-template-columns:minmax(0,1fr) 72px;gap:8px;align-items:center}
.te-editor-card .te-artwork{max-width:none;width:100%;justify-self:stretch}
.te-editor-card .te-picture-actions{gap:10px}
.te-editor-card .te-picture-actions button{width:72px;height:72px;min-height:72px;padding:0}
.te-editor-card .te-picture-actions button i{width:32px;height:32px;font-size:30px}
.te-editor-card .te-artwork-custom>img{max-height:320px}
@media(max-width:350px){.auth-card.te-editor-card{padding-inline:16px}.te-editor-card .te-picture{grid-template-columns:minmax(0,1fr) 64px}.te-editor-card .te-picture-actions button{width:64px;height:64px;min-height:64px}}
:is(.te-artwork,.ph-detail-media,.ph-card-visual,#te-preview,#te-watch-content)[data-media-state]::before{background:none;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;border:0}
.ph-loading-line{background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important}
.account-resend{margin-top:16px}.account-resend .auth-btn{width:100%;font:inherit;cursor:pointer}.account-mail-status{font-size:14px;line-height:1.3;color:#ddd;margin:12px 0}


.smooth-media .ph-card :is(h3,.ph-author,.ph-card-actions){animation:none!important;opacity:0;filter:blur(3px);transition:opacity .65s ease,filter .8s ease}
.smooth-media .ph-card.st-card-ready :is(h3,.ph-author,.ph-card-actions){opacity:1;filter:blur(0)}
@media(prefers-reduced-motion:reduce){.smooth-media .ph-card :is(h3,.ph-author,.ph-card-actions){transition:none}}

body .auth-card.te-editor-card{padding-inline:12px}
#te-upload .te-primary{display:none}
body .app-container:has(>.main-container>.auth-card){padding-top:0!important}
