/* One interface font family across the home, community and all calculators. SVG chart glyphs retain their symbol fonts. */
:root{--site-font:var(--ds-font)}
body,body :is(h1,h2,h3,h4,h5,h6,p,a,button,input,select,textarea,option,optgroup,label,legend,th,td,caption,summary,div,span,small,strong,b,em,i,time,li,dt,dd,blockquote,figcaption,output){font-family:var(--site-font)!important}

/* Старые имена --ui-* оставлены для совместимости; значения берутся из design-tokens.css. */
:root{--ui-space-1:var(--ds-space-1);--ui-space-2:var(--ds-space-2)}
body.rami-academy :is(.account-heading h1,.member-identity h1,.messages-page-title,.calculator-heading){font-size:var(--ui-title);line-height:1.3;font-weight:500;letter-spacing:normal}body.rami-academy .account-panel{padding:var(--ui-space-5)}body.rami-academy .account-panel h2{font-size:var(--ui-section);line-height:1.35}body.rami-academy .account-heading{margin-bottom:var(--ui-space-4)}body.rami-academy .account-tabs{margin-bottom:var(--ui-space-4)}body.rami-academy :is(.button:not(.small):not(.icon-button),header.app-header .tbtn){min-height:var(--ui-control);font-size:var(--ui-label);border-radius:var(--ui-radius)}
body.sciences-page header.app-header{max-width:1280px;margin:auto;padding:16px 24px 0;gap:12px;background:transparent;border:0;box-sizing:border-box;flex-wrap:wrap}body.sciences-page .calculator-heading{margin:0}body.sciences-page .mode-tabs{max-width:1280px;box-sizing:border-box;padding:0 24px;margin:16px auto;gap:8px}body.sciences-page .mode-tab{min-height:52px;padding:8px 12px;border-radius:var(--ds-radius-panel);font-size:14px;box-shadow:none;justify-content:center}body.sciences-page .mode-tab .ico{width:24px;height:var(--ds-control);flex-basis:24px;border:0;background:transparent}body.sciences-page .vs-layout{max-width:1280px;margin:0 auto 24px;padding:0 24px;gap:20px;box-sizing:border-box}body.sciences-page .vs-layout:not(.collapsed){grid-template-columns:minmax(320px,380px) minmax(0,1fr)}
@media(max-width:980px){body.sciences-page .vs-layout:not(.collapsed){grid-template-columns:minmax(0,1fr)}}
@media(max-width:700px){body.rami-academy :is(.account-heading h1,.member-identity h1,.messages-page-title,.calculator-heading){font-size:22px}body.rami-academy .account-panel{padding:16px}body.sciences-page header.app-header{padding:16px 16px 0}body.sciences-page .mode-tabs,body.sciences-page .vs-layout{padding-left:16px;padding-right:16px}.sciences-page .mode-tab{gap:6px}}

/* Compact interface shared by the community, account and calculators. */
:root{--ui-control:var(--ds-control);--ui-text:var(--ds-fs-text);--ui-label:var(--ds-fs-text);--ui-section:var(--ds-fs-h2);--ui-title:var(--ds-fs-h1);--ui-radius:var(--ds-radius-control);--ui-space-3:var(--ds-space-2);--ui-space-4:var(--ds-space-3);--ui-space-5:var(--ds-space-3);--ui-space-6:var(--ds-space-4)}
body :is(button,.button,.btn,.tbtn,.mode-tab,.account-dropdown a):not(.yantra *):not(:has(img,video,canvas)):not(.story-card){min-height:var(--ds-control)!important;padding:var(--ds-control-pad)!important;font-size:var(--ds-fs-text)!important;line-height:var(--ds-lh-text)!important;border-radius:var(--ds-radius-control)!important;box-sizing:border-box}
body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]):not([type=file]),select){height:var(--ds-control)!important;min-height:var(--ds-control)!important;padding:var(--ds-control-pad)!important;font-size:var(--ds-fs-text)!important;line-height:var(--ds-lh-text)!important;border-radius:var(--ds-radius-control)!important;box-sizing:border-box;max-width:100%}
body textarea{min-height:var(--ds-textarea-min)!important;padding:var(--ds-textarea-pad)!important;font-size:var(--ds-fs-text)!important;line-height:1.5!important;border-radius:var(--ds-radius-control)!important;box-sizing:border-box;max-width:100%}
body :is(form label,.field label,.form-label,.input-label){font-size:var(--ds-fs-text)!important;line-height:1.4!important}
body :is(.account-panel,.profile-settings-section,.lotus-details,.form-panel,.calculator-panel,.input-panel){padding:var(--ds-panel-pad)!important;border-radius:6px!important}
body :is(.form-row,.form-grid,.personal-diary-controls,.account-tabs,.mode-tabs){gap:8px!important}
body .account-dropdown{width:192px;padding:4px;font-size:var(--ds-fs-text);border-radius:6px}
body .home-actions #homeTheme{padding:0!important;border:0!important;font-size:17px!important}
body.sciences-page .mode-tab .ico{width:16px;height:16px;flex-basis:16px}

/* Calculator controls also have explicit legacy heights, not only min-heights. */
body.rami-academy :is(.v3-layout,.app-header,.modal) :is(button,.btn,.tbtn):not(.ck-circle):not(:has(img,video,canvas)){height:auto!important;min-height:var(--ds-control)!important;padding:var(--ds-control-pad)!important;font-size:var(--ds-fs-text)!important;line-height:var(--ds-lh-text)!important;letter-spacing:normal!important}
body.rami-academy :is(.v3-layout,.modal) .btn{height:var(--ds-control)!important;padding:var(--ds-control-pad)!important}
body.rami-academy .v3-left .gender-row{height:var(--ds-control)!important}
body.rami-academy .v3-left .gender-label{font-size:var(--ds-fs-text)!important;border-radius:var(--ds-radius-control)!important}
body.rami-academy .v3-left .check-line{height:var(--ds-control)!important}
body.rami-academy :is(.v3-left .wrap.form-wrap,.v3-layout .card){padding:12px!important;margin-bottom:12px!important}
body.rami-academy .cbox .ctools a,body.rami-academy .cbox .pills button{min-height:var(--ds-control)!important;min-width:24px!important;padding:3px 8px!important}

/* Uniform compact information rows and profile sections. */
body .account-details{margin:10px 0 0!important;border-radius:var(--ds-radius-control)!important;grid-template-columns:repeat(auto-fit,minmax(160px,1fr))!important;align-items:stretch}
body .account-details>div{padding:6px 10px!important;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:2px}
body .account-details :is(dt,dd){margin:0!important;font-size:var(--ds-fs-text)!important;line-height:var(--ds-lh-text)!important}
body .account-details dd{font-weight:500}
body .profile-settings-section{margin-top:12px!important;padding:10px 0!important}
body .account-panel{font-size:var(--ds-fs-text);line-height:1.4}
body .account-panel :is(p,.hint,.text-link,.notification-option small){font-size:var(--ds-fs-text)!important;line-height:1.4!important}
body .account-panel p{margin-top:6px;margin-bottom:6px}
body .account-panel .profile-head{gap:12px;margin-bottom:12px}
body .account-panel .profile-head :is(h2,p){margin:0 0 4px!important}
body .account-panel .panel-head{gap:8px;margin-bottom:8px}
body .account-panel .account-form{gap:4px}
body .account-panel .account-form label{margin-top:4px}
body .account-panel .account-form .actions{margin-top:8px}
body .account-panel .notification-option{padding:6px 0!important}
@media(max-width:480px){body .account-details{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
/* Quiet, consistent navigation; icons do not need decorative containers. */
body :is(.site-header,.app-header,.site-navigation-header) :is(nav a,.header-actions button){font-size:var(--ds-fs-text)!important;line-height:var(--ds-lh-text)!important;min-height:var(--ds-control)!important;height:auto!important;padding:4px 6px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
body :is(.site-header,.app-header,.site-navigation-header) nav a:is(.active,[aria-current=page]){font-weight:600!important;text-decoration:underline;text-underline-offset:5px}
body :is(.site-header,.app-header,.site-navigation-header) :is(nav a,.header-actions button) svg{width:16px!important;height:16px!important;flex:0 0 16px}
body :is(.bell-button,.icon-button,button[aria-label="Переключить тему"]){width:24px!important;height:var(--ds-control)!important;min-height:var(--ds-control)!important;padding:2px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
body :is(.bell-button,.icon-button) svg{width:16px!important;height:16px!important}
body :is(.account-panel,.profile-settings-section,.lotus-details,.form-panel,.calculator-panel,.input-panel){border:0!important;border-radius:0!important;box-shadow:none!important}
body .account-details{border:0!important;border-radius:0!important;background:transparent!important;gap:8px!important}
body .account-details>div{background:transparent!important;border:0!important}
body :is(.button,.btn,.tbtn):not(.yantra *){box-shadow:none!important;background-image:none!important;border-radius:3px!important}
body :is(.button.secondary,.button.ghost,.tbtn):not(.yantra *){border-color:transparent!important;background:transparent!important}
body .home-actions a{border:0!important;background:transparent!important}
body :is(button,a):focus-visible{outline:2px solid var(--accent-gold,#94703c);outline-offset:2px}
/* Tight vertical rhythm in account forms and diary readings. */
body .account-page{font-size:var(--ds-fs-text);line-height:var(--ds-lh-text)}
body .account-page :is(p,li,dt,dd,label,.entry-text,.entry-notes){line-height:var(--ds-lh-text)!important}
body .account-page p{margin:4px 0!important}
body .account-page .section-gap{margin-top:12px!important}
body .account-page :is(.form-grid,.horoscope-form-grid){row-gap:8px!important}
body .account-page .form-grid>div{gap:4px!important}
body .account-page :is(.form-grid label,.horoscope-form label){margin:4px 0!important;gap:4px!important}
body .account-page :is(.horoscope-form,.horoscope-reading,.horoscope-other-spheres,.horoscope-day-section,.horoscope-affirmation){margin-top:8px!important}
body .account-page .daily-horoscope{margin:8px 0!important;padding:4px 0!important;line-height:var(--ds-lh-text)!important;font-size:var(--ds-fs-text)!important;border:0!important}
body .account-page :is(.horoscope-sphere,.horoscope-timeline li){padding:4px 0!important}
body .account-page .daily-horoscope summary{min-height:var(--ds-control)!important;padding:4px 0!important;line-height:var(--ds-lh-text)!important}
body .account-page .diary-list{gap:8px!important}
body .account-page .diary-entry{padding:8px 10px!important}
body .account-page .diary-entry h3{margin:4px 0 0!important}
body .account-page :is(.entry-text,.entry-notes){margin:4px 0 0!important}
body .account-page .data-table :is(th,td){padding:5px 8px!important;line-height:var(--ds-lh-text)!important}

/* Consistent compact spacing for profile settings. */
body .account-page #panel-profile .profile-settings-section{margin-top:12px!important;padding:0!important}
body .account-page #panel-profile .profile-settings-section>h2{margin:0 0 8px!important}
body .account-page #horoscopeSettings{margin:0!important;padding:0!important}
body .account-page #horoscopeSettings .horoscope-form{margin-top:0!important;display:grid;gap:8px}
body .account-page #horoscopeSettings .horoscope-form :is(label,p){margin:0!important}
body .account-page #horoscopeSettings .horoscope-form fieldset{margin:0;padding:0;display:grid;gap:8px}
body .account-page #horoscopeSettings .horoscope-form legend{margin-bottom:8px;padding:0}
body .account-page #horoscopeSettings [data-birth]{display:grid;gap:8px}
body .account-page #horoscopeSettings .horoscope-form-grid{gap:8px!important}
body .account-page #horoscopeSettings .horoscope-cities:empty{display:none}

/* Site-wide type and spacing scale: shared by every public interface. */
body{font-size:var(--ui-text)!important;line-height:var(--ds-lh-text)}
body :is(p,li,dt,dd,label,legend,th,td,caption,summary,blockquote,figcaption,output,.hint,.form-hint,.text-link){font-size:var(--ui-text)!important;line-height:var(--ds-lh-text)!important}
body :is(h1,h2,h3,h4,h5,h6){font-weight:500;letter-spacing:normal!important}
body h1{font-size:var(--ui-title)!important;line-height:var(--ds-lh-h1)!important;margin:0 0 12px}
body h2{font-size:var(--ui-section)!important;line-height:var(--ds-lh-h2)!important;margin:0 0 8px}
body :is(h3,h4,h5,h6){font-size:var(--ds-fs-h3)!important;line-height:var(--ds-lh-h3)!important;margin:0 0 8px}
body p{margin-block:8px}
body :is(.form-row,.form-grid,.horoscope-form-grid,.personal-diary-controls,.actions,.panel-head){gap:8px!important}
body :is(.form-grid,.horoscope-form-grid)>div{min-width:0}
body :is(.form-label,.input-label,form label){gap:4px!important}
body :is(.form-panel,.calculator-panel,.input-panel,.lotus-details){padding:var(--ds-panel-pad)!important}
body :is(.section-gap,.horoscope-reading,.horoscope-other-spheres){margin-top:12px!important}
body :is(.data-table th,.data-table td){padding:4px 8px!important}

/* Primary actions use the same pale beige as the home community circle. */
:root{--ui-button-beige:var(--ds-button-bg);--ui-button-ink:var(--ds-button-ink);--ui-button-border:var(--ds-button-border)}
body :is(.button.primary,.button:not(.secondary):not(.ghost):not(.danger),.btn:not(.ghost):not(.secondary):not(.danger),.tbtn:not(.ghost),.mode-tab.on,.mark-mode.on,.palm-views button[aria-pressed=true],.mode button.on,#lotusCommunity){
background:var(--ui-button-beige)!important;color:var(--ui-button-ink)!important;border-color:var(--ui-button-border)!important}
body :is(.button.primary,.btn:not(.ghost):not(.secondary):not(.danger),.tbtn:not(.ghost)):hover:not(:disabled){background:linear-gradient(145deg,#f5efe2,#e3d6bc)!important;color:var(--ui-button-ink)!important}
body :is(.button.primary,.btn,.tbtn):disabled{opacity:.55}

/* The lotus uses the shared pale gold for every selected control. */
body .lotus-matrix button[aria-pressed=true],
body :is(.lotus-level,.lotus-view-switch,.lotus-quadrant) button[aria-pressed=true]{
background:var(--ui-button-beige)!important;color:var(--ui-button-ink)!important;border-color:var(--ui-button-border)!important}

html body:not(#palette-specificity){
--bg-color:var(--ds-bg);--bg:var(--ds-bg);--surface-color:var(--ds-surface);--surface:var(--ds-surface);--panel:var(--ds-surface);--text-primary:var(--ds-ink);--text:var(--ds-ink);--ink:var(--ds-ink);--text-secondary:var(--ds-muted);--muted:var(--ds-muted);--border-color:var(--ds-line);--line:var(--ds-line);--accent-gold:var(--ds-accent);--accent:var(--ds-accent);--accent-gold-rgb:var(--ds-accent-rgb);
--rami-ivory:var(--ds-bg);--rami-paper:var(--ds-surface);--rami-surface:var(--ds-surface);--rami-ink:var(--ds-ink);--rami-muted:var(--ds-muted);--rami-line:var(--ds-line);--rami-gold:var(--ds-accent);--rami-plum:var(--ds-ink);--rami-plum-deep:var(--ds-ink);
--y-bg:var(--ds-bg);--y-field:var(--ds-surface);--y-card:var(--ds-surface);--y-ink:var(--ds-ink);--y-sub:var(--ds-muted);--y-line:var(--ds-line);--y-g2:var(--ds-accent);--y-g2-rgb:var(--ds-accent-rgb);
background-color:var(--ds-bg);color:var(--ds-ink);
}

html body.rami-academy:not(.theme-light):not(.theme-neutral):not(#palette-specificity),html[data-theme="dark"] body:not(#palette-specificity){
--bg-color:#050810;--bg:#050810;--surface-color:#0e1220;--surface:#0e1220;--panel:#0e1220;--text-primary:#ece7dc;--text:#ece7dc;--ink:#ece7dc;--text-secondary:#8a8a93;--muted:#8a8a93;--border-color:rgba(203,167,123,.32);--line:rgba(203,167,123,.32);--accent-gold:#cba77b;--accent:#cba77b;--accent-gold-rgb:203,167,123;
--rami-ivory:#050810;--rami-paper:#0e1220;--rami-surface:#0e1220;--rami-ink:#ece7dc;--rami-muted:#8a8a93;--rami-line:rgba(203,167,123,.32);--rami-gold:#cba77b;--rami-plum:#ece7dc;--rami-plum-deep:#ece7dc;
--y-bg:#050810;--y-field:#0e1220;--y-card:#0e1220;--y-ink:#ece7dc;--y-sub:#8a8a93;--y-line:rgba(203,167,123,.32);--y-g2:#cba77b;--y-g2-rgb:203,167,123;
background-color:#050810;color:#ece7dc;
}
html body.rami-academy:not(.theme-light):not(.theme-neutral){color-scheme:dark;--y-soft:#181d2b;--surface-hover:#181d2b}

/* Equal gender segments, aligned with the shared control height. */
html body .gender-row{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:0!important;height:var(--ui-control)!important}
html body .gender-row .gender-option{display:block!important;min-width:0;width:100%;height:var(--ui-control)!important;margin:0!important;padding:0!important}
html body .gender-row .gender-label{display:flex!important;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:var(--ui-control)!important;min-height:var(--ui-control)!important;padding:var(--ds-control-pad)!important;font-size:var(--ui-label)!important;line-height:var(--ds-lh-text)!important}
html body .gender-row .gender-option input:checked + .gender-label{background:var(--ui-button-beige)!important;color:var(--ui-button-ink)!important;border-color:var(--ui-button-border)!important}

/* Restore the full grid in natal calculation tables. */
html body.rami-academy #tabBody .nt-box table.nt-t{border-collapse:collapse!important;border:1px solid var(--accent-gold,#a67c3d)!important}
html body.rami-academy #tabBody .nt-box table.nt-t :is(th,td){border:1px solid color-mix(in srgb,var(--accent-gold,#a67c3d) 60%,var(--bg-color,#efe9df))!important}

/* Shared soft rectangular geometry for interface controls and panels. */
:root{--ui-control-radius:var(--ds-radius-control);--ui-panel-radius:var(--ds-radius-panel)}
html body :is(button,.button,.btn,.tbtn,.mode-tab,.y-theme,.mark-mode,.path-btn,.add-row,.palm-views,input:not([type=radio]):not([type=checkbox]):not([type=range]),select,textarea):not(.yantra *):not(.story-card){border-radius:var(--ui-control-radius)!important}
html body :is(.card,.panel,.account-panel,.form-panel,.calculator-panel,.input-panel,.tips,.jframe,.lotus-details,.hp-fold,.rt-tip,details.adv,.modal .box,dialog){border-radius:var(--ui-panel-radius)!important}
html body input[type=file]{font:inherit;color:var(--text-primary,var(--text));max-width:100%;min-width:0}
html body input[type=file]::file-selector-button{box-sizing:border-box;min-height:var(--ds-control);padding:var(--ds-control-pad);margin-right:8px;border:1px solid var(--ui-button-border);border-radius:var(--ui-control-radius)!important;background:var(--ui-button-beige);color:var(--ui-button-ink);font:inherit;line-height:var(--ds-lh-text);cursor:pointer}
html body input[type=file]::file-selector-button:hover{background:#eee5d4}
html body input[type=file]:focus-visible{outline:2px solid var(--accent-gold);outline-offset:2px}

/* Compact community feed. */
html body[data-social-page="community"] :is(.wall-section,#composer){box-sizing:border-box;width:100%;max-width:560px;min-width:0}
html body[data-social-page="community"] #feed{gap:12px}
html body[data-social-page="community"] #feed>.post{box-sizing:border-box;width:100%;padding:12px;border-radius:var(--ds-radius-panel)}
html body[data-social-page="community"] .post-header{gap:8px;margin:0 0 8px;min-height:32px}
html body[data-social-page="community"] .post-avatar-link{width:32px;height:32px}
html body[data-social-page="community"] .post-text{margin:8px 0}
html body[data-social-page="community"] .post>.media{margin-top:8px;margin-bottom:8px}
html body[data-social-page="community"] .post-footer{margin-top:8px;padding-top:0}

html body.rami-academy .v3-left .form-wrap label{font-size:var(--ds-fs-text)!important;line-height:var(--ds-lh-text)!important;font-weight:600!important;text-transform:none!important;letter-spacing:normal!important}

/* Align the collapse control and fields to one compact panel inset. */
html body.rami-academy #formHost .calc-form-panel{padding:12px!important}
html body.rami-academy #formHost .calc-form-panel .calc-switcher{margin:0 0 8px!important;padding:0!important;justify-content:flex-start;gap:0!important}
html body.rami-academy #formHost .calc-switcher .focus-toggle{margin:0!important}
html body.rami-academy #formHost .calc-form-panel .wrap.form-wrap{padding:0!important;margin:0!important}

/* Desktop quick chat: independent readable scale, unaffected by compact forms. */
html body .floating-messenger .floating-chat-window{width:360px;max-width:calc(100vw - 36px);border-radius:var(--ds-radius-panel)!important}
html body .floating-messenger .floating-chat-window>header{height:48px;padding:4px 8px}
html body .floating-messenger .floating-chat-content{height:min(432px,calc(100dvh - 116px))}
html body .floating-messenger .floating-chat-window :is(button,a){min-height:32px!important;height:32px!important;font-size:14px!important;line-height:20px!important}
html body .floating-messenger .floating-chat-window svg{width:20px;height:20px}
html body.mini-messenger #panel-messages :is(.dm-body,.emoji-editor,.dm-dialog-name,.dm-dialog-preview){font-size:14px!important;line-height:20px!important}
html body.mini-messenger #panel-messages .dm-log{padding:12px;gap:8px}
html body.mini-messenger #panel-messages .dm-message{max-width:88%;padding:8px 12px}
html body.mini-messenger #panel-messages .dm-message footer{font-size:11px!important;line-height:14px!important}
html body.mini-messenger #panel-messages .dm-form{padding:8px 12px}
html body.mini-messenger #panel-messages .emoji-editor{min-height:40px!important;max-height:120px;padding:8px!important}
html body.mini-messenger #panel-messages .dm-tools :is(button,.icon-button,.emoji-button){width:32px!important;min-width:32px!important;height:32px!important;min-height:32px!important;padding:6px!important}
html body.mini-messenger #panel-messages .dm-tools svg{width:20px!important;height:20px!important}

/* Quick-chat proportions measured from the supplied desktop reference. */
html body .floating-messenger .floating-chat-window{width:440px;max-width:calc(100vw - 36px)}
html body .floating-messenger .floating-chat-window>header{height:56px;padding:8px 12px;gap:4px}
html body .floating-messenger .floating-chat-content{height:min(520px,calc(100dvh - 112px))}
html body .floating-messenger .floating-chat-window .floating-chat-title{font-size:16px!important;line-height:22px!important}
html body .floating-messenger .floating-chat-window :is(button,a):not(.floating-chat-title){width:36px;min-width:36px;height:36px!important;min-height:36px!important;padding:6px!important}
html body .floating-messenger .floating-chat-window svg{width:24px;height:var(--ds-control)}
html body.mini-messenger #panel-messages :is(.dm-body,.emoji-editor,.dm-dialog-name,.dm-dialog-preview){font-size:16px!important;line-height:22px!important}
html body.mini-messenger #panel-messages .dm-log{padding:12px;gap:8px}
html body.mini-messenger #panel-messages .dm-message{max-width:82%;padding:8px 12px}
html body.mini-messenger #panel-messages .dm-message footer{font-size:11px!important;line-height:14px!important}
html body.mini-messenger #panel-messages .emoji-editor{min-height:40px!important;line-height:22px!important}
html body.mini-messenger #panel-messages .dm-tools :is(button,.icon-button,.emoji-button){width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;padding:6px!important}
html body.mini-messenger #panel-messages .dm-tools svg{width:24px!important;height:var(--ds-control)!important}

html body[data-social-page="community"] .feed-heading[hidden]{display:none!important}
html body[data-social-page="community"] #feedStatus:empty{display:none}
html body[data-social-page="community"]>.layout{padding-top:12px!important}
html body[data-social-page="community"] .wall-section{margin-top:0}

/* Half-height desktop community header. */
@media(min-width:701px){
html body[data-social-page="community"]>.site-header{box-sizing:border-box;height:32px;min-height:32px;padding-top:0!important;padding-bottom:0!important;align-items:center}
html body[data-social-page="community"]>.site-header .astra-brand{min-height:var(--ds-control);height:var(--ds-control);padding-block:0}
}

/* One inter-block gap; nested repost wrappers must not add their own spacing. */
:root{--ui-block-gap:var(--ds-block-gap)}
html body .post>.post-header{margin-bottom:0!important}
html body .post>.vk-material{margin:var(--ui-block-gap) 0 0!important;padding:0!important;border-top:0!important}
html body .post>.vk-material>.media:first-child{margin-top:0!important}
html body .post>.vk-material>.media{margin-bottom:0!important}
html body :is(#feed,.diary-list,.form-grid,.horoscope-form-grid){gap:var(--ui-block-gap)!important}
html body :is(.post-footer,.comments,.reply-form,.section-gap,.profile-settings-section){margin-top:var(--ui-block-gap)!important}
html body .post :is(.post-text,.source-text,.source-link,.attachment-note){margin-top:var(--ui-block-gap)!important;margin-bottom:0!important}

/* Compact quick chat: roughly one third of the previous window area. */
html body .floating-messenger .floating-chat-window{width:300px}
html body .floating-messenger .floating-chat-window>header{height:32px;padding:4px 8px;gap:4px}
html body .floating-messenger .floating-chat-content{height:min(280px,calc(100dvh - 88px))}
html body .floating-messenger .floating-chat-window .floating-chat-title{font-size:var(--ds-fs-text)!important;line-height:var(--ds-lh-text)!important}
html body .floating-messenger .floating-chat-window :is(button,a):not(.floating-chat-title){width:24px!important;min-width:24px!important;height:var(--ds-control)!important;min-height:var(--ds-control)!important;padding:4px!important}
html body .floating-messenger .floating-chat-window svg{width:16px;height:16px}
html body.mini-messenger #dmSearchForm{display:none!important}
html body.mini-messenger #panel-messages :is(.dm-body,.emoji-editor,.dm-dialog-name,.dm-dialog-preview){font-size:var(--ds-fs-text)!important;line-height:var(--ds-lh-text)!important}
html body.mini-messenger #panel-messages .dm-tools :is(button,.icon-button,.emoji-button){width:24px!important;min-width:24px!important;height:var(--ds-control)!important;min-height:var(--ds-control)!important;padding:4px!important}
html body.mini-messenger #panel-messages .dm-tools svg{width:16px!important;height:16px!important}

/* History loads on upward scroll; one compact attachment row. */
html body #panel-messages #dmOlder{display:none!important}
html body .floating-messenger .floating-chat-window{width:450px;max-width:calc(100vw - 36px)}
html body .floating-messenger .floating-chat-content{height:min(420px,calc(100dvh - 88px))}
html body #panel-messages .dm-download{display:inline-flex;align-items:center;gap:6px;margin:0!important;padding:0!important;color:var(--text-primary,#2b2620)!important;min-width:0}
html body #panel-messages .dm-download span{overflow-wrap:anywhere}
html body #panel-messages .dm-download svg{width:16px;height:16px;flex:none;color:inherit}
html body #panel-messages .dm-message:has(.dm-download){display:flex;flex-wrap:wrap;align-items:flex-end;gap:4px 8px;padding:8px 10px!important}
html body #panel-messages .dm-message:has(.dm-download) .dm-body:not(:empty){flex-basis:100%}
html body #panel-messages .dm-message:has(.dm-download) footer{position:static!important;float:none!important;display:flex;justify-content:flex-end;margin:0 0 0 auto!important;flex-shrink:0}
html body #panel-messages :is(.dm-body,.dm-peer-copy a,.dm-download,.dm-dialog-name){color:var(--text-primary,#2b2620)!important}

/* Narrower quick chat with a top-left drag grip, anchored at bottom right. */
html body .floating-messenger .floating-chat-window{position:relative;width:var(--chat-width,374px);max-width:calc(100vw - 36px)}
html body .floating-messenger .floating-chat-content{height:min(var(--chat-height,420px),calc(100dvh - 88px))}
html body .floating-chat-resize{position:absolute;top:0;left:0;width:14px;height:14px;z-index:5;cursor:nwse-resize;touch-action:none}
html body .floating-chat-resize::before{content:"";position:absolute;top:3px;left:3px;width:6px;height:6px;border-top:2px solid var(--muted,#7a7264);border-left:2px solid var(--muted,#7a7264);opacity:.6}
html body .floating-messenger.is-resizing iframe{pointer-events:none}
html body .floating-messenger.is-resizing{user-select:none}
html body .floating-chat-window:has(.floating-chat-content[hidden]) .floating-chat-resize{display:none}

/* Fit narrow conversations without horizontal scrolling; cap resize at 20 CSS cm. */
html body .floating-messenger .floating-chat-window{max-width:min(20cm,calc(100vw - 36px))}
html body.mini-messenger #panel-messages :is(.dm-main,.dm-conversation,.dm-history,.dm-log){min-width:0!important;max-width:100%;box-sizing:border-box}
html body.mini-messenger #panel-messages .dm-log{overflow-x:hidden!important}
html body.mini-messenger #panel-messages .dm-message{min-width:0!important;max-width:100%!important;box-sizing:border-box;overflow-wrap:anywhere}
html body.mini-messenger #panel-messages :is(.dm-body,.dm-download,.dm-voice-message,.voice-message,.music-message){min-width:0!important;max-width:100%!important;box-sizing:border-box}
html body.mini-messenger #panel-messages :is(img,video,audio){max-width:100%}
html body.mini-messenger #panel-messages .voice-control{min-width:0;flex-wrap:wrap}
html body.mini-messenger #panel-messages .dm-download span{min-width:0;overflow-wrap:anywhere}

/* Black scrollbar and range thumbs; preserve the beige interface palette. */
html,html body,html body *{scrollbar-color:#000 transparent!important}
html::-webkit-scrollbar-thumb,html body::-webkit-scrollbar-thumb,html body *::-webkit-scrollbar-thumb{background:#000!important;border-color:transparent!important}
html body input[type=range]::-webkit-slider-thumb{background:#000!important;border-color:#000!important}
html body input[type=range]::-moz-range-thumb{background:#000!important;border-color:#000!important}
html body input[type=range]{accent-color:#000!important;color:#000!important}

/* Beige liquid glass, scoped to community and messaging surfaces. */
html body[data-social-page="community"] :is(.post,.composer,.community-navigation),
html body[data-social-view="messages"] #panel-messages,
html body .floating-messenger .floating-chat-window{
background:linear-gradient(135deg,rgba(255,253,248,.72),rgba(247,242,232,.55))!important;
border:1px solid rgba(255,255,255,.72)!important;
box-shadow:0 8px 24px rgba(38,34,28,.08),inset 0 1px 0 rgba(255,255,255,.9)!important;
-webkit-backdrop-filter:blur(20px) saturate(125%);backdrop-filter:blur(20px) saturate(125%);
}
html body[data-social-view="messages"] #panel-messages :is(.dm-head,.dm-form),
html body .floating-chat-window>header{
background:rgba(255,253,248,.55)!important;
border-color:rgba(255,255,255,.65)!important;
}
html body.mini-messenger,html body.mini-messenger #panel-messages{background:rgba(247,242,232,.72)!important}
html body[data-social-view="messages"] #panel-messages .dm-message{
background:linear-gradient(135deg,rgba(246,239,225,.88),rgba(237,228,211,.75))!important;
box-shadow:inset 0 1px 0 rgba(255,255,255,.7)!important;
border:1px solid rgba(255,255,255,.48);
}
html body[data-social-view="messages"] #panel-messages .dm-own{background:linear-gradient(135deg,rgba(255,254,250,.95),rgba(248,243,232,.85))!important}
@supports not (backdrop-filter:blur(1px)){
html body[data-social-page="community"] :is(.post,.composer,.community-navigation),
html body[data-social-view="messages"] #panel-messages,
html body .floating-messenger .floating-chat-window{background:#f7f2e8!important}
}

/* AI conversation shares the beige messaging surfaces. */
html body.rami-academy .chatpanel{
background:linear-gradient(135deg,rgba(255,253,248,.72),rgba(247,242,232,.55))!important;
border:1px solid rgba(255,255,255,.72)!important;border-radius:var(--ds-radius-panel)!important;
box-shadow:0 8px 24px rgba(38,34,28,.08),inset 0 1px 0 rgba(255,255,255,.9)!important;
-webkit-backdrop-filter:blur(20px) saturate(125%);backdrop-filter:blur(20px) saturate(125%);
color:#2b2620!important;
}
html body.rami-academy .chatpanel .msgs{padding:12px!important;gap:8px!important}
html body.rami-academy .chatpanel .msg{padding:8px 12px!important;max-width:92%;box-sizing:border-box;border-radius:var(--ds-radius-panel)!important;border:1px solid rgba(255,255,255,.48)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.7);font-size:var(--ds-fs-text)!important;line-height:var(--ds-lh-text)!important;color:#2b2620!important;overflow-wrap:anywhere}
html body.rami-academy .chatpanel .msg.ai{background:linear-gradient(135deg,rgba(246,239,225,.88),rgba(237,228,211,.75))!important;align-self:flex-start}
html body.rami-academy .chatpanel .msg.me{background:linear-gradient(135deg,rgba(255,254,250,.95),rgba(248,243,232,.85))!important;align-self:flex-end}
html body.rami-academy .chatpanel .msg :is(a,.tag){color:#2b2620!important}
html body.rami-academy .chatpanel .msg .tag{font-size:10px!important;line-height:14px;margin-bottom:4px;background:transparent}
html body.rami-academy .chatpanel .chatinput{padding:8px 12px!important;gap:8px;background:rgba(255,253,248,.55)!important;border-color:rgba(255,255,255,.65)!important}
html body.rami-academy .chatpanel #chatIn{background:rgba(255,254,250,.7)!important;color:#2b2620!important;border:1px solid rgba(215,199,165,.5)!important;border-radius:var(--ds-radius-control)!important;min-height:40px!important;padding:8px!important;font-size:var(--ds-fs-text)!important;line-height:var(--ds-lh-text)!important}
html body.rami-academy .chatpanel #chatGo{color:#2b2620!important;background:var(--ui-button-beige)!important;border-radius:var(--ds-radius-control)!important}
@supports not (backdrop-filter:blur(1px)){html body.rami-academy .chatpanel{background:#f7f2e8!important}}

/* Personal blog shares the community glass treatment. */
html body[data-social-page="member"]:not(.mini-messenger) :is(.member-card,.post,.composer,.community-editor,.daily-horoscope){
background:linear-gradient(135deg,rgba(255,253,248,.72),rgba(247,242,232,.55))!important;
border:1px solid rgba(255,255,255,.72)!important;border-radius:var(--ds-radius-panel)!important;
box-shadow:0 8px 24px rgba(38,34,28,.08),inset 0 1px 0 rgba(255,255,255,.9)!important;
-webkit-backdrop-filter:blur(20px) saturate(125%);backdrop-filter:blur(20px) saturate(125%);
}
@supports not (backdrop-filter:blur(1px)){
html body[data-social-page="member"]:not(.mini-messenger) :is(.member-card,.post,.composer,.community-editor,.daily-horoscope){background:#f7f2e8!important}
}

/* Glass composer in full and mini conversations. */
html body #panel-messages form#dmForm{
background:linear-gradient(135deg,rgba(255,253,248,.72),rgba(247,242,232,.48))!important;
border:1px solid rgba(255,255,255,.75)!important;border-radius:var(--ds-radius-panel)!important;
box-shadow:0 -4px 16px rgba(38,34,28,.04),inset 0 1px 0 rgba(255,255,255,.95)!important;
-webkit-backdrop-filter:blur(20px) saturate(125%);backdrop-filter:blur(20px) saturate(125%);
}
html body #panel-messages #dmForm :is(textarea,.emoji-editor){
background:rgba(255,254,250,.48)!important;border:1px solid rgba(215,199,165,.4)!important;
box-shadow:inset 0 1px 0 rgba(255,255,255,.8)!important;color:#2b2620!important;
}
html body #panel-messages #dmForm .dm-tools{background:transparent!important}
@supports not (backdrop-filter:blur(1px)){html body #panel-messages form#dmForm{background:#f7f2e8!important}}

/* Compact peer header, scoped to the full conversation. */
@media(min-width:701px){
html body:not(.mini-messenger) #dmConversation>.dm-head{box-sizing:border-box;width:50%;min-width:260px;max-width:100%;align-self:flex-start;padding-inline:12px}
}

/* Align personal stories and forecast controls with the publication column. */
html body[data-social-page="member"] .member-page #memberStories{width:100%;max-width:720px;box-sizing:border-box;margin-inline:auto}
html body[data-social-page="member"] #memberStories .stories-grid{padding-inline:0;scroll-padding-inline:0}
html body[data-social-page="member"] .member-feed-toolbar{align-items:flex-start}
html body[data-social-page="member"] .member-feed-toolbar #dailyHoroscope{padding-block:0!important}
html body[data-social-page="member"] .member-feed-toolbar .horoscope-toggle{min-height:32px!important}
html body[data-social-page="member"] .member-feed-toolbar .publication-launcher>.publication-trigger{height:34px!important;min-height:34px!important;display:flex;align-items:center;justify-content:center}

/* Unified beige glass for the calculator shell and primary panels. */
html body.rami-academy:has(#formHost){
--calc-glass:linear-gradient(135deg,rgba(255,253,248,.76),rgba(247,242,232,.56));
--calc-glass-line:rgba(255,255,255,.75);
}
html body.rami-academy:has(#formHost) :is(.app-header,.calc-form-panel,.v3-center>.card,.v3-center>.wrap,.v3-right,.modal>.box){
background:var(--calc-glass)!important;
border:1px solid var(--calc-glass-line)!important;
box-shadow:0 8px 24px rgba(38,34,28,.08),inset 0 1px 0 rgba(255,255,255,.9)!important;
-webkit-backdrop-filter:blur(20px) saturate(125%);backdrop-filter:blur(20px) saturate(125%);
border-radius:var(--ds-radius-panel)!important;
}
html body.rami-academy:has(#formHost) .app-header{border-radius:0!important}
html body.rami-academy:has(#formHost) .v3-left .form-wrap{
background:var(--calc-glass)!important;border-color:var(--calc-glass-line)!important;
box-shadow:inset 0 1px 0 rgba(255,255,255,.8)!important;border-radius:var(--ds-radius-panel)!important;
}
html body.rami-academy:has(#formHost) .calc-form-panel .form-wrap{background:transparent!important;box-shadow:none!important}
html body.rami-academy:has(#formHost) .v3-right :is(.chatpanel,.msgs,.ai-chat-sidebar){
background:transparent!important;box-shadow:none!important;backdrop-filter:none;-webkit-backdrop-filter:none;border-color:transparent!important;
}
html body.rami-academy:has(#formHost) :is(.chat-title,.chatpanel .quota,.chatpanel .calc-attach,.res-head,.res-foot,.v3-center .tabs,.chatpanel .chatinput){
background:rgba(255,253,248,.38)!important;border-color:rgba(255,255,255,.6)!important;
}
html body.rami-academy:has(#formHost) .v3-center :is(.cbox,.nt-box){
background:rgba(255,253,248,.42)!important;border-color:rgba(255,255,255,.7)!important;
box-shadow:inset 0 1px 0 rgba(255,255,255,.7);border-radius:var(--ds-radius-panel)!important;
}
@supports not (backdrop-filter:blur(1px)){
html body.rami-academy:has(#formHost){--calc-glass:#f7f2e8}
}

/* Plain bold account link in the calculator header. */
html body.rami-academy .app-header a#accountBtn{border:0!important;background:transparent!important;box-shadow:none!important;font-weight:700!important;text-decoration:none!important}
html body.rami-academy .app-header a#accountBtn:focus-visible{outline:2px solid currentColor;outline-offset:3px}

/* Keep the AI send button level with both edges of the growing input. */
html body.rami-academy .chatpanel .chatinput{align-items:stretch!important}
html body.rami-academy .chatpanel .chatinput #chatIn{box-sizing:border-box;margin-block:0!important}
html body.rami-academy .chatpanel .chatinput #chatGo{height:auto!important;min-height:40px!important;max-height:none!important;align-self:stretch!important;margin-block:0!important}

/* Compact community navigation, preserving its full width. */
html body[data-social-page="community"] .community-profile>nav.community-navigation{width:100%;max-width:100%;box-sizing:border-box;min-height:26px!important;padding-block:0!important;gap:16px}
html body[data-social-page="community"] .community-navigation :is(a,button){height:var(--ds-control)!important;min-height:var(--ds-control)!important;padding-block:0!important;box-sizing:border-box;line-height:20px!important}
html body[data-social-page="community"] .community-navigation .publication-launcher{margin-block:0!important}

/* Community post date sits beside the author name. */
html body[data-social-page="community"] .post-header>.post-author-info{display:flex;align-items:baseline;gap:8px;min-width:0}
html body[data-social-page="community"] .post-header>.post-author-info>.post-author{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body[data-social-page="community"] .post-header>.post-author-info>.post-date{flex:none;white-space:nowrap;margin:0}

/* Light beige glass for text entry throughout the light interface. */
html body:is(.theme-light,[data-community-theme="beige"],.lotus-home) :is(input:not([type]),input[type="text"],input[type="search"],input[type="email"],input[type="password"],input[type="tel"],input[type="url"],input[type="number"],input[type="date"],input[type="time"],input[type="datetime-local"],textarea,.emoji-editor,[contenteditable="true"][role="textbox"]){
background:linear-gradient(135deg,rgba(255,254,250,.94),rgba(255,252,245,.78))!important;
color:#2b2620!important;
border:1px solid rgba(215,199,165,.55)!important;
box-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 2px 6px rgba(38,34,28,.025)!important;
-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
}

/* Shared beige liquid-glass surfaces across the site. */
html body:is(.theme-light,[data-community-theme="beige"],.lotus-home){
--site-glass:linear-gradient(135deg,rgba(255,253,248,.78),rgba(247,242,232,.58));
--site-glass-edge:rgba(255,255,255,.76);
--site-glass-shadow:0 8px 24px rgba(38,34,28,.07),inset 0 1px 0 rgba(255,255,255,.95);
}
html body:is(.theme-light,[data-community-theme="beige"],.lotus-home) :is(.panel,.card,.account-panel,.member-card,.post,.composer,.community-editor,.daily-horoscope,.chat-shell,.dm-main,.topic-form,.discussion-card,.topic-card,.lotus-details,dialog,.modal>.box,.account-dropdown,.publication-choices,.dropdown-menu,.context-menu){
background:var(--site-glass)!important;border:1px solid var(--site-glass-edge)!important;
box-shadow:var(--site-glass-shadow)!important;border-radius:var(--ds-radius-panel)!important;
-webkit-backdrop-filter:blur(20px) saturate(125%);backdrop-filter:blur(20px) saturate(125%);
}
html body:is(.theme-light,[data-community-theme="beige"],.lotus-home) :is(.site-header,.app-header,.community-navigation,.mobile-nav,.chat-heading,.chat-form,.dm-head,.dm-form,.composer-footer){
background:var(--site-glass)!important;border-color:var(--site-glass-edge)!important;
box-shadow:inset 0 1px 0 rgba(255,255,255,.8)!important;
-webkit-backdrop-filter:blur(16px) saturate(125%);backdrop-filter:blur(16px) saturate(125%);
}
html body:is(.theme-light,[data-community-theme="beige"],.lotus-home) :is(.button,.btn,.tbtn,.icon-button,.mode-tab,.account-tabs button,.publication-trigger){
background:linear-gradient(135deg,rgba(255,254,250,.8),rgba(239,231,215,.55))!important;
border-color:rgba(255,255,255,.8)!important;
box-shadow:inset 0 1px 0 rgba(255,255,255,.9)!important;
border-radius:var(--ds-radius-control)!important;
}
html body:is(.theme-light,[data-community-theme="beige"],.lotus-home) :is(.button,.btn,.tbtn,.mode-tab)[aria-selected="true"],
html body:is(.theme-light,[data-community-theme="beige"],.lotus-home) :is(.button,.btn,.tbtn,.mode-tab)[aria-pressed="true"]{
background:linear-gradient(135deg,rgba(246,236,214,.95),rgba(230,217,188,.8))!important;
}
html body:is(.theme-light,[data-community-theme="beige"],.lotus-home) :is(.chat-log,.dm-log){background:transparent!important}
@supports not (backdrop-filter:blur(1px)){
html body:is(.theme-light,[data-community-theme="beige"],.lotus-home){--site-glass:#f7f2e8}
}

/* Compact community-chat title row. */
html body #chatMain .chat-heading{padding:4px 12px!important;min-height:32px!important;gap:8px!important;box-sizing:border-box}
html body #chatMain #chatTitle{font-size:var(--ds-fs-text)!important;line-height:20px!important;font-weight:600!important;margin:0!important}
html body #chatMain #chatContext:empty{display:none}
html body #chatMain .chat-heading .icon-button{height:var(--ds-control)!important;min-height:var(--ds-control)!important;min-width:24px!important;padding:2px!important}

/* One glass send-button style for assistant, private and community chats. */
html body :is(#chatSend,#dmSend,#chatGo,.reply-form button[type="submit"]){
background:linear-gradient(135deg,rgba(255,254,250,.8),rgba(239,231,215,.55))!important;
color:#2b2620!important;border:1px solid rgba(215,199,165,.55)!important;
border-radius:var(--ds-radius-control)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.9)!important;
width:36px!important;min-width:36px!important;max-width:36px!important;
min-height:40px!important;padding:0!important;font-size:0!important;line-height:0!important;
}
html body :is(#chatSend,#dmSend,#chatGo,.reply-form button[type="submit"])::after{border-radius:var(--ds-radius-control)!important}

/* Floating messenger launcher matches the glass surfaces. */
html body .floating-messenger>button.floating-chat-launcher{
background:linear-gradient(135deg,rgba(255,253,248,.8),rgba(247,242,232,.55))!important;
border:1px solid rgba(255,255,255,.8)!important;border-radius:var(--ds-radius-control)!important;
box-shadow:0 5px 18px rgba(38,34,28,.09),inset 0 1px 0 rgba(255,255,255,.95)!important;
color:#2b2620!important;-webkit-backdrop-filter:blur(20px) saturate(125%);backdrop-filter:blur(20px) saturate(125%);
}

/* Compact glass publication action beside the Publications tab. */
html body[data-social-page="community"] .community-navigation>#publicationLauncher{margin:0 -8px 0 0!important;flex:none;align-self:center;line-height:0}
html body[data-social-page="community"] #publicationLauncher>#openPublicationMenu{display:flex;align-items:center;justify-content:center;width:24px;min-width:24px;height:var(--ds-control)!important;min-height:var(--ds-control)!important;padding:3px!important;border:1px solid rgba(255,255,255,.8);border-radius:7px;background:rgba(255,255,255,.48);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);box-shadow:0 2px 5px rgba(70,51,30,.08);color:var(--text)}
html body[data-social-page="community"] #openPublicationMenu svg{width:16px;height:16px}
html body[data-social-page="community"] #openPublicationMenu:hover{background:rgba(255,255,255,.55)}
html body[data-social-page="community"] #publicationLauncher>.publication-choices{left:0;right:auto;max-width:calc(100vw - 32px)}

/* Opaque publication menu, separated from its trigger. */
html body[data-social-page="community"] #publicationLauncher>#publicationChoices{top:calc(100% + 8px + 1.5mm);background:#f7f2e8!important;backdrop-filter:none;-webkit-backdrop-filter:none;border:1px solid var(--line);box-shadow:0 8px 24px rgba(70,51,30,.16)}
html body[data-social-page="community"]:not(.theme-light):not([data-community-theme="beige"]) #publicationLauncher>#publicationChoices{background:#292620!important}

/* One compact file picker for both story photos and videos. */
html body .story-editor .story-batch-heading>.story-file-label{display:inline-flex;align-items:center;justify-content:center;flex:none;width:auto;min-width:0;min-height:28px;height:28px;padding:4px 8px;margin:0;gap:4px;font-size:var(--ds-fs-text);line-height:18px;border-radius:7px}
html body .story-editor .story-batch-heading>.story-file-label svg{width:14px;height:14px;flex:none}
html body .story-editor .story-batch-heading>.story-file-label input[type="file"]{position:absolute;inset:0;width:100%;height:100%;min-width:0;min-height:0;opacity:0;padding:0;border:0;cursor:pointer}
html body .story-editor .story-batch-heading>.story-source-actions{display:none!important}

/* Light story editor and borderless upload control. */
html body dialog.story-editor{background:#f7f2e8!important;color:#302b24;backdrop-filter:none;-webkit-backdrop-filter:none}
html body .story-editor .story-batch-heading>.story-file-label{border:0!important;box-shadow:none;background:rgba(255,255,255,.65)!important;color:#302b24}
html body .story-editor .story-batch-heading>.story-file-label:focus-within{outline:2px solid #8a795d;outline-offset:2px}

/* Compact desktop story editor, without the full-window empty canvas. */
@media(min-width:701px){
 html body dialog.story-editor{width:min(600px,calc(100vw - 32px));height:min(380px,calc(var(--studio-height,100dvh) - 32px));padding:12px;gap:6px}
 html body .story-editor .story-editor-layout{grid-template-columns:minmax(0,1fr) 270px;gap:12px}
 html body .story-editor .story-dialog-head{min-height:28px}
 html body .story-editor .story-dialog-head h2{font-size:16px}
 html body .story-editor .studio-history .icon-button{width:30px;min-width:30px;height:30px;min-height:30px}
 html body .story-editor .studio-tools button{min-height:40px;gap:2px;font-size:10px}
 html body .story-editor .studio-tools button svg{width:18px;height:18px}
 html body .story-editor .story-stage [data-placeholder]{font-size:14px;padding:8px}
 html body .story-editor .story-stage [data-placeholder] small{font-size:11px}
 html body .story-editor .story-draft{flex-basis:30px;height:40px}
 html body .story-editor .story-dialog-actions .button{min-height:30px;padding:4px 10px}
}

html body dialog.story-editor>.story-dialog-actions{background:transparent!important;border:0!important;box-shadow:none!important;backdrop-filter:none;-webkit-backdrop-filter:none;padding:0;min-height:0}

/* Beige liquid glass adapted from AstroApp's light theme. */
html body dialog.story-editor{--bg:#f7f2e8;--surface:#fffaf1;--text:#2b2620;--muted:#796343;--accent:#966f36;--accent-soft:#eee0c8;--line:rgba(166,124,61,.22);background:linear-gradient(135deg,rgba(255,253,248,.97),rgba(240,233,220,.96))!important;color:var(--text);border:1px solid rgba(255,255,255,.85);box-shadow:0 18px 50px rgba(120,95,50,.22),inset 0 1px 0 #fff;backdrop-filter:blur(18px) saturate(140%);-webkit-backdrop-filter:blur(18px) saturate(140%)}
html body dialog.story-editor::backdrop{background:rgba(97,73,42,.25);backdrop-filter:blur(3px)}
html body .story-editor .story-stage{background:#eee0c8;color:#796343;box-shadow:inset 0 0 0 1px rgba(166,124,61,.18)}
html body .story-editor .story-stage [data-placeholder]{color:#796343;border:1px dashed rgba(166,124,61,.35);border-radius:var(--ds-radius-panel);margin:8px}
html body .story-editor :is(.button,.icon-button,.studio-tools button){color:#725631!important;background:linear-gradient(135deg,rgba(255,255,255,.55),rgba(240,224,192,.22))!important;border-color:rgba(166,124,61,.16);box-shadow:inset 0 1px 0 rgba(255,255,255,.75)}
html body .story-editor button:disabled{opacity:1;color:#9a8565!important;background:#eee6d8!important;cursor:default}
html body .story-editor .studio-tools button[aria-expanded=true]{background:#ead9bb!important;color:#513c20!important}
html body .story-editor :is(.studio-panel-heading,.story-editor-options,.studio-panel-shell){background:transparent;color:#725631}
html body .story-editor :is(input:not([type=file]),textarea,select){background:#fffaf1!important;color:#513c20!important;border-color:rgba(166,124,61,.25)!important}
html body .story-editor .hint{color:#796343}
@media(min-width:701px){
 html body .story-editor .studio-tools{display:flex;flex-direction:column;gap:2px}
 html body .story-editor .studio-tools button{flex-direction:row;justify-content:flex-start;min-height:28px;padding:4px 8px;gap:10px;font-size:var(--ds-fs-text);border:0;background:transparent!important;box-shadow:none}
 html body .story-editor .story-editor-options{overflow-y:auto}
 html body .story-editor .studio-panel-shell{flex:none;overflow:visible}
}

/* Black editor text on beige surfaces; uploaded media stays unchanged. */
html body dialog.story-editor{--text:#000;--muted:#000;color:#000}
html body dialog.story-editor :is(h2,h3,label,legend,.hint,.story-batch-heading,.story-preview-nav,.story-editor-options,.studio-panel-heading,.studio-panel-shell,.button,.icon-button,.studio-tools button,button:disabled,input:not([type=file]),textarea,select,[data-placeholder]){color:#000!important}
html body dialog.story-editor :is(input,textarea)::placeholder{color:#000;opacity:.65}

/* Narrow story editor with a single-column layout on every screen. */
html body dialog.story-editor{width:min(320px,calc(100vw - 24px));height:auto;max-height:calc(var(--studio-height,100dvh) - 24px);margin:auto;padding:12px;gap:8px;border-radius:14px;overflow-y:auto;overflow-x:hidden}
html body .story-editor .story-editor-layout{display:flex;flex-direction:column;flex:none;gap:8px;min-height:0}
html body .story-editor .story-editor-preview{flex:none;overflow:visible}
html body .story-editor .story-stage{height:180px!important;width:auto!important;max-width:100%;flex:none}
html body .story-editor .story-editor-options{flex:none;max-height:none;overflow:visible}
html body .story-editor .studio-tools{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}
html body .story-editor .studio-tools button{display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:0;min-height:42px;padding:4px 2px;gap:3px;font-size:10px}
html body .story-editor .studio-panel-shell{max-height:none;overflow:visible;flex:none}
html body .story-editor .story-dialog-head{min-height:28px;gap:4px}
html body .story-editor .story-dialog-head h2{font-size:15px;white-space:nowrap}
html body .story-editor .studio-history{gap:0}
html body .story-editor .studio-history .icon-button{width:28px;min-width:28px;height:28px;min-height:28px;padding:4px}
html body .story-editor .story-dialog-actions{justify-content:flex-end;gap:6px;flex-wrap:wrap}
html body .story-editor .story-dialog-actions [data-publish]{min-width:0;flex:1}
html body .story-editor .story-dialog-actions .button{min-height:36px;padding:6px 10px}
@media(pointer:coarse){html body .story-editor .studio-tools button,html body .story-editor .story-dialog-actions .button{min-height:44px}}

/* Community posts use a text-only author heading. */
html body .post-header>.post-avatar-link[href="/community.html#communityTitle"]{display:none}

/* Size the dialog to its content instead of stretching between viewport edges. */
html body dialog.story-editor{height:fit-content!important;min-height:0!important;max-height:calc(var(--studio-height,100dvh) - 24px);padding-bottom:12px;align-content:start}
