/* V25 UI stabilization — one layout authority */
html,body{width:100%;margin:0;overflow-x:hidden!important}*{box-sizing:border-box}body{padding:0!important}.shell{width:min(100%,760px);margin:0 auto;position:relative}
header{position:sticky!important;top:0!important;z-index:180!important;display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:72px!important;padding:10px 18px!important;background:linear-gradient(110deg,#37136b,#7b3de0)!important}.header-actions{display:flex;gap:8px;align-items:center}.theme-toggle,.header-settings{position:static!important;inset:auto!important;transform:none!important;width:46px!important;height:46px!important;min-width:46px!important;border-radius:16px!important;display:grid!important;place-items:center!important;margin:0!important;background:#ffffff18!important;color:#fff!important;border:1px solid #ffffff1f!important;box-shadow:none!important;font-size:21px!important}.header-settings{text-decoration:none!important}
main{position:relative;z-index:1}.page-profile-edit main,.page-settings main,.page-feed main,.page-discover main,.page-messages main{padding-top:0!important}
/* editor */
.profile-editor-page{background:var(--app-bg)!important;color:var(--app-text)!important;padding:18px 16px 120px!important;min-height:calc(100dvh - 72px)!important}.profile-editor-head{display:flex!important;align-items:center!important;gap:12px!important;padding:4px 0 18px!important;background:transparent!important}.profile-editor-head>a{width:44px;height:44px;display:grid;place-items:center;border-radius:14px;background:var(--app-panel2);color:var(--app-text)!important;text-decoration:none;font-size:32px}.profile-editor-head h1,.profile-editor-head small{color:var(--app-text)!important}.profile-editor-head h1{margin:2px 0 0!important}.editor-card{background:var(--app-panel)!important;color:var(--app-text)!important;border:1px solid var(--app-line)!important;border-radius:28px!important;padding:22px!important;margin:0 0 18px!important}.editor-card h2,.editor-card label,.editor-title h2{color:var(--app-text)!important}.editor-card p,.editor-card small,.existing-photo-note{color:var(--app-muted)!important}.editor-field input,.editor-field textarea{background:var(--app-panel2)!important;color:var(--app-text)!important;border:1px solid var(--app-line)!important}.photo-slot{background:var(--app-panel2)!important;border-color:var(--app-line)!important}.photo-slot-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important}.photo-slot{aspect-ratio:1/1.18!important;min-width:0!important}.editor-save-wrap{position:static!important;background:transparent!important;padding:0!important}.editor-save{width:100%!important}
/* discover interactive */
.video-discover-head{padding:18px 16px 0!important}.video-search{display:flex!important;align-items:center!important;gap:10px!important;padding:0 16px!important;height:58px!important;border-radius:16px!important;pointer-events:auto!important}.video-search input{flex:1!important;min-width:0!important;height:100%!important;border:0!important;outline:0!important;background:transparent!important;color:var(--app-text)!important;font:inherit!important}.video-search input::placeholder{color:var(--app-muted)!important}.video-filter{display:flex!important;align-items:center!important;justify-content:space-between!important;width:100%!important;height:58px!important;border:0!important;border-bottom:1px solid var(--app-line)!important;background:transparent!important;color:var(--app-text)!important;padding:0 14px!important;font:inherit!important;pointer-events:auto!important}.discover-filter-panel{display:flex;gap:8px;padding:10px 4px 2px}.discover-filter-panel[hidden]{display:none!important}.discover-filter-panel button{border:1px solid var(--app-line);background:var(--app-panel);color:var(--app-text);border-radius:999px;padding:9px 12px}.discover-filter-panel button.active{background:var(--app-accent);color:#fff}.page-discover .page-title,.page-discover .online-strip{display:none!important}
/* story */
.story-filter-wrap{padding:10px 16px 0}.story-filter-wrap>button{width:100%;height:52px;border:0;border-bottom:1px solid var(--app-line);display:flex;justify-content:space-between;align-items:center;background:transparent;color:var(--app-text);font:inherit}.story-filter-wrap>div{display:flex;gap:8px;padding:10px 0}.story-filter-wrap>div[hidden]{display:none!important}.story-filter-wrap>div button{border:1px solid var(--app-line);border-radius:999px;background:var(--app-panel);color:var(--app-text);padding:8px 14px}.story-viewer{position:fixed!important;z-index:500!important;inset:0!important;width:100%!important;height:100dvh!important;background:#100d17!important;overflow:auto!important}.story-viewer #story-stage{min-height:100dvh;display:flex;flex-direction:column}.story-viewer #story-stage>img{width:100%;max-height:72dvh;object-fit:contain;background:#100d17}.viewer-user{padding:72px 20px 12px;color:#fff;display:flex;justify-content:space-between}.viewer-actions{margin-top:auto;padding:14px 16px calc(18px + env(safe-area-inset-bottom));display:flex;align-items:center;gap:10px;background:linear-gradient(transparent,#000b)}.viewer-actions form{margin:0}.story-heart{width:52px;height:52px;border-radius:50%;border:1px solid #ffffff55;background:#ffffff14;color:#fff;font-size:20px}.story-heart.liked{color:#ff4f7a}.story-reply{display:flex!important;flex:1!important;gap:8px}.story-reply input{flex:1;min-width:0;border:1px solid #ffffff33;border-radius:999px;background:#ffffff14;color:#fff;padding:0 16px}.story-reply button{border:0;border-radius:999px;padding:0 16px;background:#7666f3;color:#fff}.story-close{z-index:5!important}
/* bottom navigation: no legacy pseudo/icons overlap */
nav{display:grid!important;grid-template-columns:repeat(5,1fr)!important;align-items:stretch!important;height:calc(72px + env(safe-area-inset-bottom))!important;padding:0 4px env(safe-area-inset-bottom)!important}nav a{position:relative!important;display:flex!important;align-items:center!important;justify-content:center!important;min-width:0!important;height:72px!important;padding:0 2px!important;text-decoration:none!important;background:transparent!important}nav a:before,nav a:after{display:none!important;content:none!important}nav a span{display:block!important;position:static!important;font-size:12px!important;line-height:1.1!important;white-space:nowrap!important;color:var(--app-muted)!important}nav a.on span{color:var(--app-accent)!important;font-weight:700!important}
/* messages */
.inbox-head{padding:22px 18px!important}.inbox-head h1{color:var(--app-text)!important}.chat-list{padding:0 16px 110px!important}.chat-list>a{background:var(--app-panel)!important;color:var(--app-text)!important;border:1px solid var(--app-line)!important}
/* light theme editor was previously black due old cascade */
html[data-theme="light"] .profile-editor-page{background:#f6f4f9!important;color:#17131d!important}html[data-theme="light"] .editor-card{background:#fff!important;color:#17131d!important}html[data-theme="light"] .profile-editor-head h1,html[data-theme="light"] .profile-editor-head small,html[data-theme="light"] .editor-card h2,html[data-theme="light"] .editor-card label,html[data-theme="light"] .editor-title h2{color:#17131d!important}html[data-theme="light"] .editor-field input,html[data-theme="light"] .editor-field textarea,html[data-theme="light"] .photo-slot{background:#f8f5fb!important;color:#17131d!important}
@media(max-width:430px){.photo-slot-grid{gap:8px!important}.editor-card{padding:16px!important;border-radius:22px!important}.profile-editor-page{padding-left:12px!important;padding-right:12px!important}.theme-toggle,.header-settings{width:42px!important;height:42px!important;min-width:42px!important;border-radius:14px!important}}
