/* Local Google Sans variable, SIL OFL 1.1; Latin and Cyrillic. */
@font-face{font-family:"Google Sans";font-style:normal;font-weight:400 700;font-display:swap;src:url("./fonts/google-sans-latin-cyrillic.woff2") format("woff2")}
*{box-sizing:border-box}
:root{
 --font-ui:"Google Sans",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Arial,sans-serif;
 color-scheme:light;
 --bg:#f3f4f6;--panel:#f1f2f4;--line:#e8e8eb;--text:#141414;--muted:#6b6b70;
 --accent:#141414;--pink:#fa266a;--surface:#fff;--hover:#f3f3f3;
 --button-bg:#f1f1f1;--button-hover:#e7e7e7;--danger:#be2450;
 --accent-soft:#ededed;--on-accent:#fff;--accent-hover:#353535;
 --shadow:#0000000c;--overlay:#17171766;--nav-color:#292929;--avatar-text:#505050;
 --bottom-bg:#fffffff5;--topbar-height:72px;--mobile-top-height:65px;--mobile-nav-height:76px;
}
:root[data-theme="dark"]{
 color-scheme:dark;
 --bg:#101010;--panel:#1b1b1b;--line:#303030;--text:#f4f4f4;--muted:#a0a0a0;
 --accent:#f4f4f4;--pink:#ff628d;--surface:#161616;--hover:#ffffff0d;
 --button-bg:#282828;--button-hover:#353535;--danger:#ff829e;
 --accent-soft:#2b2b2b;--on-accent:#171717;--accent-hover:#dcdcdc;
 --shadow:#00000040;--overlay:#0009;--nav-color:#dedede;--avatar-text:#ddd;--bottom-bg:#101010f5;
}
html{scrollbar-gutter:stable}
html.page-modal-open{overflow:hidden}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font-ui);font-size:14px;line-height:1.5}
button,input,textarea,select{font:inherit}
button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}
button{cursor:pointer;color:inherit;border:0}
button:disabled{opacity:.5;cursor:pointer}
input:disabled,textarea:disabled,select:disabled{cursor:default}
a{color:inherit;text-decoration:none}
a:hover{color:var(--accent)}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
h1,h2,h3,p{margin-top:0}
h1{font-size:27px;letter-spacing:-.8px;line-height:1.2}
h2{font-size:20px;letter-spacing:-.4px}
small{color:var(--muted)}
img,video{max-width:100%}
svg{display:block;flex-shrink:0}
.wordmark{display:inline-flex;align-items:center;font-weight:700;font-size:43px;letter-spacing:-3px;line-height:1.2;color:var(--text)}
.wordmark span{color:inherit}
.avatar{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:var(--accent-soft);color:var(--avatar-text);font-weight:650;flex-shrink:0;vertical-align:middle;object-fit:cover;position:relative;overflow:hidden;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.avatar>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none;-webkit-user-drag:none;border-radius:inherit}
/* Suppress native image callouts/dragging without intercepting clicks, scroll,
   video controls, selectable text, or the avatar crop editor. */
:where(img,canvas.media-reflection):not(:where(.avatar-editor,.avatar-editor *,input,textarea,select,input *,textarea *,select *,[contenteditable]:not([contenteditable="false"]),[contenteditable]:not([contenteditable="false"]) *,[role="textbox"],[role="textbox"] *)){-webkit-touch-callout:none;-webkit-user-drag:none;-webkit-user-select:none;user-select:none}
.btn{font-size:15px;display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:10px 18px;border:1px solid var(--line);border-radius:8px;background:var(--button-bg);font-weight:600;transition:background .16s,transform .16s}
.btn:hover{background:var(--button-hover)}
.btn:active{transform:none}
.btn.primary,.primary{background:var(--accent);color:var(--on-accent);border-color:transparent}
.btn.primary:hover{background:var(--accent-hover)}
.icon-btn{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:8px;background:transparent;border-radius:50%;color:inherit;transition:background .16s,transform .16s}
.icon-btn:hover{background:var(--hover)}
.icon-btn:active{transform:none}
.text-btn{font-size:15px;background:transparent;color:var(--accent);padding:4px;font-weight:600}
.field{display:block;width:100%;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:12px 14px;min-height:46px;resize:vertical}
.field::placeholder{color:var(--muted)}
.empty{text-align:center;color:var(--muted);padding:65px 20px}
.empty h1,.empty h2{color:var(--text)}
.boot{min-height:100dvh;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:20px}
.boot p{color:var(--muted)}

/* Main navigation: one quiet desktop bar, reachable mobile controls. */
.desktop-top{position:sticky;top:0;z-index:30;height:var(--topbar-height);border-bottom:1px solid var(--line);background:var(--bg)}
:root:not([data-theme="dark"]) .desktop-top,:root:not([data-theme="dark"]) .mobile-top{background:var(--surface)}
.topbar-inner{height:100%;max-width:1120px;margin:auto;padding:0 24px;display:grid;grid-template-columns:minmax(100px,1fr) minmax(160px,420px) minmax(244px,1fr);align-items:center;gap:24px}
.topbar-inner>.wordmark{justify-self:start;font-size:30px;letter-spacing:-1.5px}
.topbar-search{display:flex;align-items:center;gap:10px;height:42px;min-width:0;width:100%;max-width:420px;justify-self:center;padding:0 16px;border:1px solid transparent;border-radius:8px;background:var(--panel);color:var(--muted);transition:border-color .16s,background .16s}
.topbar-search:focus-within{border-color:var(--line);background:var(--surface)}
.topbar-search>svg{width:18px;height:18px}
.topbar-search input{min-width:0;width:100%;height:42px;border:0;background:transparent;color:var(--text);outline:none;font-size:14px}
.topbar-search input::placeholder{color:var(--muted)}
.topbar-search-submit{display:flex;align-items:center;justify-content:center;flex-shrink:0;min-height:36px;min-width:36px;margin-right:-7px;padding:6px;border-radius:5px;background:transparent;color:var(--text)}
.topbar-search-submit:hover{background:var(--hover)}
.topbar-search-submit svg{width:18px;height:18px}
.topbar-nav{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0}
.nav-item{display:flex;align-items:center;justify-content:center;gap:12px;min-width:44px;min-height:44px;padding:8px;border-radius:7px;color:var(--nav-color);background:transparent;text-align:left;font-size:15px;font-weight:500;transition:background .16s,color .16s,transform .16s}
.nav-item:hover{background:var(--hover);color:var(--text)}
.nav-item:active{transform:none}
.nav-item.active{color:var(--accent);font-weight:700}
.nav-item.active .icon{stroke-width:2.2}
.topbar-nav .nav-item{position:relative;width:44px;height:44px;flex:none;border-radius:8px}
.topbar-nav .nav-item>span:not(.avatar){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.topbar-nav .nav-item>.icon{width:24px;height:24px}
.topbar-nav .topbar-account{padding:7px}
.topbar-account.active .avatar{outline:none}
.page-area{min-width:0}
.content-columns{max-width:1120px;margin:auto;display:grid;grid-template-columns:minmax(0,600px) 260px;justify-content:center;gap:64px;padding:40px 32px 60px}
.main-view{min-width:0;outline:none}
.discovery-rail{position:sticky;top:calc(var(--topbar-height) + 28px);align-self:start;min-width:0;padding-top:8px}
.account-mini{display:flex;align-items:center;gap:12px;padding:0 0 25px;min-width:0}
.account-mini strong,.account-mini small{display:block;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.copyright{display:block;font-size:11px;margin:24px 0 0;color:var(--muted)}
.mobile-top,.bottom-nav{display:none}
.page-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:3px 0 22px}
.eyebrow{color:var(--muted);font-size:11px;text-transform:uppercase;font-weight:650;letter-spacing:1.9px;margin-bottom:9px}
.page-heading h1{margin:0}

/* Shared dialogs and feedback. */
.has-modal{overflow:hidden}
.modal-overlay{position:fixed;inset:0;background:var(--overlay);backdrop-filter:blur(7px);display:flex;align-items:center;justify-content:center;z-index:100;padding:24px;animation:fade-in .16s ease}
.modal{background:var(--panel);width:min(620px,100%);max-height:90dvh;border:1px solid var(--line);border-radius:14px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 24px 100px var(--shadow);outline:none;animation:sheet-in .2s ease}
.modal-header{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px 19px;border-bottom:1px solid var(--line)}
.modal-header h2{font-size:18px;margin:0}
.modal-body{padding:22px;overflow:auto;overscroll-behavior:contain;min-height:0}
.modal-body label{display:block;margin-bottom:15px}
.modal-body label .field{margin-top:7px}
#toasts{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);z-index:1000;display:flex;flex-direction:column;gap:8px;width:max-content;max-width:calc(100vw - 32px);pointer-events:none}
.toast{padding:13px 20px;border:1px solid var(--line);background:var(--panel);border-radius:8px;box-shadow:0 8px 30px var(--shadow);animation:sheet-in .2s ease}
.form-error{font-size:13px;color:var(--danger);min-height:20px;margin:8px 0}

.services-intro{color:var(--muted);max-width:390px}
.service-cards{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:30px}
.service-card{padding:26px;border:1px solid var(--line);background:var(--panel);border-radius:12px;position:relative;min-width:0}
.service-symbol{color:var(--accent);margin-bottom:36px}
.soon{position:absolute;top:30px;right:22px;font-size:11px;color:var(--muted);background:var(--hover);padding:4px 9px;border-radius:5px}
.service-card h2{font-size:18px}
.service-card p{font-size:13px;color:var(--muted)}
.service-note{border-top:1px solid var(--line);padding-top:18px;margin:24px 0 0}
.is-messages .content-columns{display:block;padding:24px 32px;max-width:1180px}
.is-messages .main-view{width:100%}

/* Appearance settings show the same top-bar structure as the real page. */
.settings-title{font-size:17px;margin:2px 0 7px}
.settings-description,.settings-footnote{color:var(--muted);font-size:13px}
.settings-footnote{margin:20px 0 2px}
.theme-choices{border:0;margin:22px 0 0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:16px}
.theme-choice{position:relative;margin:0!important;cursor:pointer}
.theme-choice input{position:absolute;opacity:0;width:1px;height:1px}
.theme-choice-card{display:block;padding:8px;border:2px solid var(--line);border-radius:10px;background:var(--surface)}
.theme-choice input:checked+.theme-choice-card{border-color:var(--accent)}
.theme-choice input:focus-visible+.theme-choice-card{outline:2px solid var(--accent);outline-offset:4px}
.theme-miniature{height:120px;display:flex;flex-direction:column;align-items:center;gap:12px;padding:12px;border-radius:6px;background:#fafafa;border:1px solid #e6e6e6}
.theme-miniature.dark{background:#111;border-color:#303030}
.theme-mini-sidebar{width:100%;height:10px;flex:none;border-bottom:1px solid #d7d7d7}
.dark .theme-mini-sidebar{border-color:#3c3c3c}
.theme-mini-post{display:flex;flex-direction:column;gap:8px;width:68%;padding:7px;background:#fff;border:1px solid #e6e6e6;border-radius:4px}
.dark .theme-mini-post{background:#1b1b1b;border-color:#333}
.theme-mini-photo{height:34px;background:#d9d9d9;border-radius:3px}
.dark .theme-mini-photo{background:#575757}
.theme-mini-line{height:5px;background:#d7d7d7;width:65%;border-radius:5px}
.dark .theme-mini-line{background:#5a5a5a}
.theme-choice-label{display:flex;align-items:center;gap:8px;padding:15px 5px 7px;font-size:15px}
.theme-choice-check{margin-left:auto;color:var(--accent);opacity:0}
.theme-choice input:checked+.theme-choice-card .theme-choice-check{opacity:1}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.account-menu-actions{display:flex;flex-direction:column;gap:10px}
.account-menu-actions>.btn{justify-content:flex-start;min-height:48px}

@keyframes fade-in{from{opacity:0}to{opacity:1}}
@keyframes sheet-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:1000px){
 .topbar-inner{padding:0 24px;gap:24px;grid-template-columns:minmax(90px,1fr) minmax(160px,420px) auto}
 .topbar-nav{gap:6px}
 .content-columns{gap:36px;padding-right:24px;padding-left:24px;grid-template-columns:minmax(0,600px) 240px}
}
@media(max-width:960px){
 .discovery-rail{display:none}
 .content-columns{display:block;max-width:664px;padding:32px}
}
@media(max-width:700px){
 .desktop-top{display:none}
 .mobile-top{height:var(--mobile-top-height);display:flex;align-items:center;justify-content:space-between;padding:8px 16px;border-bottom:1px solid var(--line);background:var(--bg)}
 .mobile-top .wordmark{font-size:34px;letter-spacing:-2.3px}
 .mobile-top>div{display:flex;align-items:center;gap:1px}
 .mobile-top .nav-item{padding:9px;min-width:44px;min-height:44px}
 .mobile-top .nav-item span{display:none}
 .mobile-top .nav-item .icon{width:24px;height:24px}
 .content-columns{max-width:632px;padding:22px 16px calc(98px + env(safe-area-inset-bottom))}
 /* Feed alone reaches the mobile viewport; its main cancels this 16px padding. */
 .content-columns:has(>.main-view>.feed-view){max-width:none}
 .main-view:has(>.feed-view){margin:0 -16px}
 .bottom-nav{display:flex;position:fixed;bottom:0;left:0;right:0;align-items:center;justify-content:space-around;min-height:var(--mobile-nav-height);background:var(--bottom-bg);backdrop-filter:blur(16px);border-top:1px solid var(--line);z-index:30;padding:7px 4px calc(7px + env(safe-area-inset-bottom))}
 .bottom-nav .nav-item{display:flex;flex-direction:column;gap:4px;padding:5px 4px;border-radius:6px;font-size:11px;min-width:52px;min-height:52px;background:transparent;color:var(--muted)}
 .bottom-nav .nav-item.active{color:var(--text)}
 .bottom-nav .nav-item .icon{width:23px;height:23px}
 .bottom-create{position:relative;isolation:isolate;width:46px;height:44px;min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center;padding:0;background:transparent;color:var(--on-accent);border-radius:7px;margin:0 4px}
 .bottom-create::before{content:"";position:absolute;inset:2px 3px;z-index:-1;background:var(--accent);border-radius:7px;pointer-events:none}
 .bottom-create>.icon{width:24px;height:24px}
 .bottom-create:active{transform:none}
 /* Light pages keep a distinct, opaque mobile navigation surface. */
 :root:not([data-theme="dark"]) .bottom-nav{--bottom-bg:#121019;--line:#ffffff12;--muted:#b7b0c4;--text:#fff;--accent:#dfd4ff;--on-accent:#fff;--button-bg:#302939;box-shadow:0 -4px 18px #12101918}
 :root:not([data-theme="dark"]) .bottom-nav .nav-item:is(:hover,:focus-visible,.active){color:#fff}
 :root:not([data-theme="dark"]) .bottom-nav .bottom-create::before{background:linear-gradient(135deg,#8066db,#5d70df)}
 .page-heading h1{font-size:24px}
 .modal-overlay{padding:0;align-items:flex-end}
 .modal{max-height:91dvh;border-radius:14px 14px 0 0;border-bottom:0;width:100%}
 .modal-body{padding:18px;padding-bottom:max(18px,env(safe-area-inset-bottom))}
 .modal-header{padding:12px 15px}
 #toasts{bottom:calc(94px + env(safe-area-inset-bottom))}
 .service-cards{grid-template-columns:1fr}
 .service-card{padding:24px}
 .service-symbol{margin-bottom:24px}
 .is-messages .content-columns{padding:8px 8px calc(var(--mobile-nav-height) + env(safe-area-inset-bottom))}
}
@media(max-width:380px){
 .theme-choices{gap:9px}
 .theme-miniature{height:100px;padding:10px;gap:8px}
 .theme-mini-photo{height:26px}
 .theme-choice-label{font-size:14px;gap:5px}
 .mobile-top{padding-right:10px;padding-left:14px}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
[hidden]{display:none!important}

/* The feed shares the page background in both themes. */
.app-layout:has(.feed-view){min-height:100dvh;background:var(--bg)}

.settings-blocked{margin-top:24px;width:100%;justify-content:flex-start}.blocked-users{display:grid;gap:16px}.blocked-user{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}.blocked-user-identity{display:flex;gap:10px;align-items:center;min-width:0}.blocked-user-identity>div{display:grid;gap:3px;min-width:0}.blocked-user-identity strong,.blocked-user-identity small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.blocked-user-identity small{color:var(--muted)}.blocked-user-error{grid-column:1/-1;color:var(--danger);font-size:13px;margin:0}.blocked-user-error:empty{display:none}@media(max-width:380px){.blocked-user{grid-template-columns:1fr}.blocked-user>.btn{justify-self:start}}

/* Quiet overflow controls: keep the hit target fixed and brighten only the glyph. */
:root button:is(.icon-btn,.publication-action):has(> :is(.icon-more,.icon-more-vertical)){
 color:var(--muted);color:color-mix(in srgb,var(--muted) 80%,var(--surface));
 background:transparent;transform:none;box-shadow:none;transition:color 160ms ease;
}
:root button:is(.icon-btn,.publication-action):has(> :is(.icon-more,.icon-more-vertical)):is(:hover,:focus-visible,:active,[aria-expanded="true"]){color:var(--text);background:transparent;transform:none}
@media(prefers-reduced-motion:reduce){:root button:is(.icon-btn,.publication-action):has(> :is(.icon-more,.icon-more-vertical)){transition:none}}

/* Hover changes only the glyph. Independent scale composes with like/bookmark
   transform animations and keeps buttons, labels and counters stationary. */
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
 :root :is(button,a):not(:where(.feed-video-controls *))>.icon{transform-origin:center;transform-box:view-box;scale:1;transition:color .16s ease,opacity .16s ease,scale .16s ease}
 :root :is(button,a):not(:where(.feed-video-controls *)):is(:not(:disabled):not([aria-disabled="true"]),[aria-pressed]):hover>.icon{scale:1.08}
}

/* 1.20: quiet live search and an explicit current navigation state. */
.topbar-search{position:relative}
.header-search-results{position:absolute;z-index:45;top:calc(100% + 8px);left:0;right:0;padding:6px;background:var(--surface);border-radius:10px;box-shadow:0 12px 40px #0002;max-height:min(420px,70dvh);overflow:auto;overscroll-behavior:contain}
.header-search-results[hidden]{display:none}
.header-search-result{display:flex;align-items:center;gap:10px;min-height:48px;padding:8px 10px;border-radius:6px;color:var(--text);text-decoration:none;font-size:13px}
.header-search-result:hover,.header-search-result:focus-visible{background:var(--hover);outline:none}
.header-search-result>span:not(.avatar){min-width:0}
.header-search-result strong,.header-search-result small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.header-search-result small{color:var(--muted);font-size:12px;margin-top:2px}
.header-search-empty{padding:12px;color:var(--muted);font-size:13px}
.topbar-nav .nav-item.active:not(.topbar-account){background:var(--accent);color:var(--on-accent)}
.topbar-nav .nav-item.active::after{content:none}
.bottom-nav .nav-item.active .icon{filter:drop-shadow(0 0 .35px currentColor)}

/* Username letters retain their inherited weight; underscores stay fine. */
@font-face{font-family:"Luma Username Underscore";font-style:normal;font-weight:300;font-display:swap;src:url("./fonts/luma-username-underscore-light.woff") format("woff");unicode-range:U+005F}
.username-underscore{font-family:"Luma Username Underscore","Google Sans",sans-serif;font-weight:300}
