:root{color-scheme:dark;--bg:#111313;--panel:#191c1b;--line:#2a2e2b;--text:#eceee8;--muted:#969e97;--accent:#c2ef8d;font-family:Inter,Segoe UI,Arial,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-size:14px}button,input{font:inherit}button,a,input{ -webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:wait;opacity:.5}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:4px}button{color:inherit} .sidebar{position:fixed;inset:0 auto 0 0;width:248px;padding:38px 22px;border-right:1px solid var(--line);display:flex;flex-direction:column}.brand{font-size:40px;font-weight:800;letter-spacing:-2px;text-decoration:none;color:var(--text);padding:0 18px}.brand span{color:var(--accent);margin-left:7px}.workspace{font-size:10px;letter-spacing:2px;color:#758077;margin:65px 18px 20px}.nav{width:100%;display:flex;align-items:center;gap:13px;border:0;background:none;text-align:left;padding:16px;border-radius:9px;margin:5px 0;color:var(--muted)}.nav>span{font-size:22px;width:22px}.nav small{margin-left:auto;font-size:10px;opacity:.5}.nav.active{background:#273122;color:var(--accent)}.nav:hover{background:#232823}.sidebar-bottom{margin-top:auto}.local{font-size:11px;color:var(--muted);margin:20px 10px}.local i{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--accent);margin-right:7px}.account{display:flex;align-items:center;gap:12px;background:none;border:1px solid var(--line);border-radius:10px;width:100%;padding:12px;text-align:left}.account small{display:block;font-size:10px;color:var(--muted);margin-top:5px}.account b{margin-left:auto}.avatar{width:36px;height:36px;display:grid;place-items:center;background:#343b2f;border-radius:50%;color:var(--accent);font-weight:600}main{max-width:1300px;margin-left:248px;padding:0 64px}header{height:100px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;font-size:12px}.breadcrumb{color:var(--muted)}.breadcrumb span{margin-left:18px}.badge{font-size:9px;letter-spacing:1.4px;border:1px solid var(--line);border-radius:30px;padding:9px 13px;color:#b5bcae}.intro{padding:57px 0 52px}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--accent)}h1{font-size:46px;font-weight:500;letter-spacing:-2px;margin:18px 0 13px}h1 em{font-family:Georgia,serif;font-weight:400;color:var(--accent)}p{color:var(--muted);line-height:1.7}h2{font-size:22px;font-weight:500;margin:0}.feed-header{display:flex;align-items:center;justify-content:space-between;gap:20px}.feed-header p{font-size:12px;margin:8px 0 0}.primary{background:var(--accent);color:#1a2412;border:0;border-radius:7px;padding:12px 18px;font-weight:600}.toolbar{display:flex;align-items:center;gap:25px;margin:26px 0 18px}.search{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:8px;padding:11px 15px;flex:1;background:#171a18}.search>span{font-size:24px;color:var(--muted)}.search input{background:none;border:none;color:var(--text);width:100%;outline:none;font-size:12px}.search kbd{border:1px solid #41473e;padding:1px 6px;border-radius:4px;color:var(--muted)}#count{font-size:11px;color:var(--muted);white-space:nowrap}#notice{border:1px solid #65704c;background:#242b1f;border-radius:8px;padding:13px;margin-bottom:16px;color:#d0dabb;font-size:12px}.post{padding:25px;border:1px solid var(--line);background:var(--panel);border-radius:12px;margin-bottom:14px}.post-head{display:flex;gap:12px;align-items:center}.post-head strong{font-size:13px}.post-head time{font-size:11px;color:var(--muted);display:block;margin-top:5px}.post p{white-space:pre-wrap;overflow-wrap:anywhere;color:#d0d5cd;line-height:1.8;margin:18px 0}.post a{font-size:11px;color:var(--accent);text-decoration:none}.empty{border:1px dashed #384033;border-radius:14px;min-height:285px;text-align:center;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:35px;background:radial-gradient(ellipse at top,#20291b55,transparent 65%)}.empty-icon{font-size:38px;color:var(--accent);margin-bottom:18px}.empty h3{font-size:19px;font-weight:500;margin:0}.empty p{max-width:370px;font-size:12px;margin:12px 0 22px}.secondary{background:none;border:1px solid #46523c;color:var(--accent);border-radius:7px;padding:11px 17px}#more{display:block;margin:25px auto}#more[hidden]{display:none}footer{display:flex;justify-content:space-between;gap:15px;font-size:9px;letter-spacing:1px;color:#6e786e;margin:45px 0 28px}dialog{background:#191d19;color:var(--text);border:1px solid #424c3c;border-radius:16px;padding:30px;width:min(490px,calc(100% - 32px))}dialog::backdrop{background:#000a;backdrop-filter:blur(5px)}.dialog-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}.dialog-top button{background:none;border:0;font-size:25px}dialog label{display:block;font-size:12px;margin:18px 0}dialog input{display:block;width:100%;padding:12px;background:#111511;border:1px solid #3a4335;border-radius:6px;margin-top:8px;color:white}dialog p,details{font-size:12px}summary{cursor:pointer;color:var(--accent)}dialog .primary{width:100%;margin-top:15px}.muted{font-size:10px}#session-error{color:#f3aa97;font-size:12px}@media(min-width:1500px){main{margin-left:calc(248px + (100vw - 1500px)/2)}}@media(max-width:950px){.sidebar{width:210px;padding:30px 14px}main{margin-left:210px;padding:0 28px}h1{font-size:36px}.badge{display:none}}@media(max-width:650px){.sidebar{position:static;width:auto;padding:20px;border-right:0;border-bottom:1px solid var(--line)}.brand{padding:0;font-size:32px}.workspace,.sidebar-bottom{display:none}nav{display:flex;gap:5px;margin-top:20px}.nav{font-size:11px;padding:10px;justify-content:center}.nav>span,.nav small{display:none}main{margin:0;padding:0 20px}header{height:60px}.intro{padding:34px 0}h1{font-size:32px}.intro p{font-size:12px}.feed-header{align-items:flex-start}.feed-header h2{font-size:20px}.primary{font-size:12px;padding:12px}.feed-header p{max-width:180px}.toolbar{gap:12px}.search kbd{display:none}footer{font-size:8px;letter-spacing:0}.post{padding:18px}}

#logs-panel{margin-top:24px}#logs-output{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;line-height:1.7;color:var(--muted)}

.media-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:18px 0}.media-item{margin:0;min-width:0;overflow:hidden;border-radius:10px;background:#101210;border:1px solid var(--line)}.media-item:only-child{grid-column:1/-1}.media-item img,.media-item video{display:block;width:100%;max-height:520px;object-fit:contain;background:#090b09}.media-item img{min-height:100px}.media-fallback{display:block;padding:18px;font-size:12px;color:var(--muted)}.media-fallback[hidden]{display:none}.quote-card{border:1px solid #3a4434;border-radius:10px;padding:18px;margin:18px 0;background:#131812}.quote-label{font-size:9px;letter-spacing:1.8px;color:var(--accent);margin-bottom:16px}.quote-card .avatar{width:28px;height:28px}.quote-card p{font-size:13px}.quote-card .media-item img,.quote-card .media-item video{max-height:350px}@media(max-width:450px){.media-grid{grid-template-columns:1fr}.quote-card{padding:12px}}

#tweet-dialog{width:min(760px,calc(100% - 24px));max-height:90vh;overflow-y:auto}.reply-open{border:0;background:none;color:var(--accent);margin-left:16px;padding:10px;cursor:pointer}.clickable-post{cursor:pointer}.clickable-post:hover{border-color:#59694c}#reply-list .post{margin-top:12px}#reply-status{font-size:12px}

.repost-label{font-size:11px;color:var(--accent);margin:0 0 10px 42px}.tweet-context{border:1px solid #3a4434;border-radius:10px;padding:10px 12px 0;margin:0 0 12px;background:#131812}.tweet-context-label{font-size:9px;letter-spacing:1.8px;text-transform:uppercase;color:var(--muted);margin:0 0 8px}.tweet-context .context-post{border:0;border-top:1px solid #394039;border-radius:0;padding:10px 0;margin:0;background:transparent}.tweet-context .context-post:first-of-type{border-top:0}.tweet-context .context-post:hover{background:transparent}

.signed-out>.sidebar,.signed-out>main{display:none}#auth-screen{min-height:100vh;display:grid;place-items:center;padding:28px;background:radial-gradient(ellipse at top,#29351b88,transparent 65%)}#auth-screen[hidden]{display:none}.auth-card{max-width:460px;width:100%}.auth-card .brand{padding:0}.auth-card .eyebrow{margin-top:38px}.auth-card h1{font-size:35px}.auth-card label{display:block;margin:18px 0;color:var(--muted)}.auth-card input{width:100%;display:block;margin-top:8px;padding:14px;border:1px solid #3a4335;border-radius:8px;background:#171c16;color:var(--text)}.auth-card .primary{width:100%}.auth-switch{background:none;border:0;color:var(--accent);padding:18px 0}#auth-error{color:#ffb3a0}#account-name{color:var(--accent);font-size:12px}header{gap:12px;flex-wrap:wrap}#disconnect{margin-top:14px;width:100%}

[hidden]{display:none!important}.avatar-button{padding:0;border:0;border-radius:50%;background:none;flex-shrink:0}.avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}.author-link{background:none;border:0;padding:0;color:var(--text);font-weight:600;text-align:left}.author-link:hover{text-decoration:underline}.post-head>div{min-width:0;overflow-wrap:anywhere}#profile-dialog,#admin-dialog{width:min(760px,calc(100% - 24px));max-height:90vh;overflow-y:auto}.profile-banner{width:100%;border-radius:10px;max-height:230px;object-fit:cover}.profile-heading,.profile-identity{display:flex;align-items:center;gap:14px;min-width:0}.profile-heading{justify-content:space-between;margin:18px 0}.profile-identity{min-width:0}.profile-identity>.avatar{width:72px;height:72px;flex-shrink:0}.profile-name{min-width:0}.profile-name h2{overflow-wrap:anywhere}.profile-name p{margin:5px 0 0;overflow-wrap:anywhere}.profile-follow{flex-shrink:0}#profile-info{margin:25px 0}#profile-info a{color:var(--accent)}.profile-bio{white-space:pre-wrap;overflow-wrap:anywhere}.registration-setting,.active-setting{display:flex;align-items:center;gap:10px}dialog input[type=checkbox]{display:inline-block;width:auto;margin:0;accent-color:var(--accent)}.admin-user{display:flex;gap:16px;align-items:center;border-top:1px solid var(--line);padding:16px 0}.admin-user>div{flex:1;overflow-wrap:anywhere}.admin-user small{display:block;color:var(--muted);margin-top:7px}.admin-user select{background:var(--bg);color:var(--text);padding:9px;border:1px solid var(--line);border-radius:6px}header{height:auto;min-height:100px;padding:16px 0}.admin-user label{white-space:nowrap}@media(max-width:500px){.admin-user{flex-wrap:wrap;gap:10px}.admin-user>div{flex-basis:100%}.profile-heading,.profile-identity{gap:10px}.profile-identity>.avatar{width:56px;height:56px}.profile-follow{font-size:12px;padding:9px 10px}header .breadcrumb{display:none}header .secondary{font-size:11px;padding:8px}}

/* Compact reading column, centered in the space beside the navigation. */
main{width:calc(100% - 248px);max-width:808px;margin-left:max(248px,calc(50% + 124px - 404px));margin-right:auto;padding:0 24px}
header{min-height:72px;gap:8px;padding:12px 0}header .secondary{padding:8px 10px;font-size:11px}.breadcrumb{flex-basis:100%;font-size:10px}.breadcrumb span{margin-left:8px}
.intro{padding:26px 0 24px}.intro h1{font-size:32px;margin:10px 0 8px;letter-spacing:-1px}.intro p{margin:0;font-size:12px}.intro .eyebrow{font-size:9px}
.feed-header h2{font-size:20px}.toolbar{margin:18px 0 12px;gap:16px}.post{padding:16px 18px;border-radius:10px;margin-bottom:10px}.post-head{gap:10px;align-items:flex-start}.post-head .avatar{width:32px;height:32px}.post-head time{margin-top:3px;font-size:10px}.author-identity{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px}.author-link{font-size:13px}.author-handle{font-size:12px;color:var(--muted);overflow-wrap:anywhere}.post p,.quote-card p{font-size:13px;line-height:1.65;margin:12px 0}.quote-card{padding:12px;margin:12px 0;border-radius:8px}.quote-card .avatar{width:28px;height:28px}.media-grid{margin:12px 0;gap:6px}.media-item img,.media-item video{max-height:420px}.quote-card .media-item img,.quote-card .media-item video{max-height:300px}
.post-actions{display:flex;justify-content:flex-end;align-items:center;gap:4px;margin-top:8px}.post-actions .post-action{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:8px;border:0;border-radius:7px;background:transparent;color:var(--muted);text-decoration:none}.post-action svg{width:18px;height:18px;flex-shrink:0}.post-actions .post-action:hover{color:var(--accent);background:#293223}.quote-card>.post-actions{margin-top:4px}
#tweet-dialog,#profile-dialog{width:min(720px,calc(100% - 24px));padding:22px}footer{margin-top:28px}
/* Profil kaydırılırken kapatma düğmesi üstte sabit kalsın. */
#profile-dialog>.dialog-top{position:sticky;top:-22px;z-index:2;margin:0 0 18px;padding:10px 0;background:#191d19;border-bottom:1px solid var(--line)}
#profile-dialog #profile-close{min-width:44px;min-height:44px;border-radius:8px;font-size:25px;line-height:1}
#profile-dialog #profile-close:hover{background:#2a3326}
#tweet-dialog .dialog-top{gap:12px}
#tweet-dialog .dialog-top h2{flex:1}
#tweet-back{flex-shrink:0;font-size:14px;padding:8px;border-radius:7px;color:var(--accent)}
#tweet-back:hover{background:#293223}
@media(min-width:651px) and (max-width:950px){main{width:calc(100% - 210px);margin-left:210px;padding:0 20px}}
@media(max-width:650px){main{width:100%;max-width:808px;margin:0 auto;padding:0}.sidebar{padding:16px}.sidebar nav{margin-top:12px}.intro{padding:22px 14px}.intro h1{font-size:28px}.post{padding:14px;margin-right:0;margin-left:0;border-radius:0}.feed-header,.toolbar,#notice,#count{margin-left:14px;margin-right:14px}.feed-header{padding-right:0}.post-actions .post-action{width:38px;height:38px}#tweet-dialog,#profile-dialog{padding:14px}#profile-dialog>.dialog-top{top:-14px}.author-identity{gap:3px 6px}.toolbar{gap:10px}}

.bookmark-action[aria-pressed=true]{color:var(--accent)}.bookmark-action[aria-pressed=true] svg{fill:currentColor}.post .bookmark-status,.quote-card .bookmark-status{font-size:11px;color:var(--muted);text-align:right;margin:4px 0 0}

.post-actions .like-action{width:auto;min-width:34px;gap:5px}.like-action[aria-pressed=true]{color:#f472b6}.like-action[aria-pressed=true] svg{fill:currentColor}.like-count{font-size:11px;font-variant-numeric:tabular-nums}.post .like-status,.quote-card .like-status{font-size:11px;color:var(--muted);text-align:right;margin:4px 0 0}

.post-actions .reply-count-action{width:auto;min-width:34px;gap:5px}.reply-count{font-size:11px;font-variant-numeric:tabular-nums}

.library-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.library-toolbar label{display:flex;align-items:center;gap:8px;font-size:12px}.library-toolbar select{max-width:210px;padding:9px;background:var(--panel);border:1px solid var(--line);color:var(--text);border-radius:6px}#library-controls>p{font-size:11px;margin:10px 0 16px}.category-chips{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.category-chip{border:1px solid #45543a;background:#232d1e;color:var(--accent);padding:4px 8px;font-size:11px;border-radius:12px}#category-dialog{width:min(560px,calc(100% - 24px));max-height:90vh;overflow-y:auto}.category-option{display:flex;align-items:center;gap:10px;padding:10px;background:var(--bg);border-radius:6px}#category-options{max-height:250px;overflow-y:auto}#category-create{border-top:1px solid var(--line);margin-top:20px;padding-top:6px}#category-management{margin-top:24px}.category-row{display:flex;gap:8px;align-items:center;margin:10px 0}.category-row input{margin:0;min-width:0}.category-row button{padding:9px}.category-option input[type=checkbox]{width:auto;margin:0}#category-status{color:var(--accent)}

#import-panel{margin:16px 0;padding:16px;border:1px solid #414f35;border-radius:10px;background:#171e15}.import-heading{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}.import-heading h3{margin:0;font-size:15px}.import-heading span,#import-panel p,#import-countdown{font-size:11px;color:var(--muted)}.import-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.import-actions button{font-size:12px;padding:9px 12px}#import-progress{width:100%;height:8px;accent-color:var(--accent)}#import-totals{font-size:12px;margin:12px 0;color:var(--accent)}#import-results-wrap{overflow-x:auto;max-height:300px}#import-results{width:100%;border-collapse:collapse;font-size:11px;font-variant-numeric:tabular-nums}#import-results caption{text-align:left;color:var(--muted);padding:8px 0}#import-results th,#import-results td{text-align:left;padding:8px 6px;border-bottom:1px solid var(--line);white-space:nowrap}#import-message{min-height:18px}

@media(max-width:650px){.sidebar nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar .nav{margin:0}.library-toolbar select{max-width:180px}}

@media(max-width:650px){
 body:not(.signed-out){padding-bottom:calc(82px + env(safe-area-inset-bottom,0px))}
 .sidebar nav{position:fixed;z-index:20;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:0;padding:8px 8px calc(8px + env(safe-area-inset-bottom,0px));background:#151a16f5;border-top:1px solid var(--line);box-shadow:0 -6px 24px #0003;backdrop-filter:blur(12px)}
 .sidebar .nav{display:flex;flex-direction:column;gap:5px;min-height:56px;padding:7px 2px;font-size:10px;text-align:center;border-radius:8px;justify-content:center;line-height:1.25}
 .sidebar .nav>span{display:block;font-size:20px;line-height:22px;width:auto}.sidebar .nav small{display:none}
}

.topbar{height:76px;gap:16px;flex-wrap:nowrap}.topbar .breadcrumb{display:block;flex-basis:auto;min-width:0;font-size:11px}.topbar .breadcrumb span{margin-left:8px}.header-actions{display:flex;align-items:center;gap:10px;margin-left:auto;flex-shrink:0}.header-profile{display:flex;align-items:center;gap:7px;background:none;border:0;padding:10px;color:var(--muted);border-radius:8px;font-size:12px}.header-profile:hover{background:#252c23;color:var(--text)}.header-profile svg{width:17px;height:17px}#account-menu{position:relative}#account-menu>summary{display:flex;align-items:center;gap:8px;list-style:none;border:1px solid var(--line);border-radius:24px;padding:5px 10px 5px 5px;color:var(--text);font-size:12px}#account-menu>summary::-webkit-details-marker{display:none}.account-symbol{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#303e28;color:var(--accent);font-weight:600}#account-name{max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-dropdown{position:absolute;right:0;top:calc(100% + 8px);z-index:30;width:200px;padding:6px;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 32px #0006}.account-dropdown button{display:block;width:100%;text-align:left;background:none;border:0;border-radius:7px;padding:12px;font-size:12px}.account-dropdown button[hidden]{display:none}.account-dropdown button:hover{background:#2a3326}.account-dropdown #logout{border-top:1px solid var(--line);border-radius:0;color:#e0aaa0;margin-top:4px}@media(max-width:650px){.topbar{height:64px;min-height:64px;gap:8px}.topbar .breadcrumb{font-size:10px}.topbar .breadcrumb span{margin-left:3px}.header-actions{gap:4px}.header-profile{padding:8px}.header-profile span{display:none}#account-name{max-width:85px}}

/* Floating notices do not shift the feed when they appear or disappear. */
#notice{position:fixed;z-index:40;right:24px;bottom:24px;width:max-content;max-width:min(420px,calc(100vw - 40px));margin:0;box-shadow:0 8px 24px #0004}
@media(max-width:650px){#notice{right:20px;bottom:calc(92px + env(safe-area-inset-bottom,0px))}}

/* A continuous feed, with a single divider between neighboring tweets. */
#posts > .post,#reply-list > .post,#profile-posts > .post{margin:0;border-radius:0;border-bottom:0}
#posts > .post:last-child,#reply-list > .post:last-child,#profile-posts > .post:last-child{border-bottom:1px solid var(--line)}
#posts > .post:hover,#reply-list > .post:hover,#profile-posts > .post:hover{border-color:var(--line);background:#1d211d}
#posts > .post + .post,#reply-list > .post + .post,#profile-posts > .post + .post{border-top:1px solid #394039}

.tweet-text .reading-prefix{font-weight:400}.reading-emphasis .tweet-text .reading-prefix{font-weight:700;color:var(--text)}

/* Keep dismissal controls outside the scrolling tweet/replies area. */
#tweet-dialog{padding:0;overflow:hidden;max-height:90vh;max-height:90dvh}
#tweet-dialog[open]{display:flex;flex-direction:column}
#tweet-dialog>.dialog-top{flex-shrink:0;margin:0;padding:10px 16px;border-bottom:1px solid var(--line);background:#191d19}
#tweet-close{min-width:44px;min-height:44px;border-radius:8px}
#tweet-close:hover{background:#2a3326}
#tweet-content{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px 22px;scrollbar-gutter:stable}
.tweet-dialog-footer{display:none}
@media(max-width:650px){
 #tweet-dialog{width:calc(100% - 16px);max-height:calc(100dvh - 24px);border-radius:14px}
 #tweet-dialog>.dialog-top h2{font-size:17px}
 #tweet-content{padding:12px;scrollbar-gutter:auto}
 #tweet-back{display:none}
 .tweet-dialog-footer{display:flex;gap:10px;flex-shrink:0;padding:8px 12px max(8px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#191d19}
 #tweet-close-bottom,#tweet-back-bottom{flex:1;min-width:0;min-height:44px}
 #tweet-back-bottom[hidden]{display:none}
}

#summary-dialog{width:min(640px,calc(100% - 24px));max-height:90dvh;overflow:auto}#summary-dialog h2 small{font-size:11px;color:var(--muted)}#summary-source{padding:8px;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:6px}#summary-result li{margin:18px 0;line-height:1.7}#summary-result a{color:var(--accent);font-size:12px;margin-right:10px}#summary-result p{white-space:pre-wrap}

#summary-log-output{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px}#summary-dialog details{margin-top:18px}

.photo-open{display:block;width:100%;padding:0;border:0;background:none;cursor:zoom-in}
.media-grid.media-gallery{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);aspect-ratio:4/3;gap:4px;border-radius:10px;overflow:hidden}
.media-gallery .media-item{min-height:0;border:0;border-radius:0}
.media-gallery .photo-open{height:100%}
.media-gallery .media-item img,.media-gallery .media-item video{width:100%;height:100%;min-height:0;max-height:none;object-fit:cover}
.media-gallery[data-count="3"]{grid-template-rows:repeat(2,minmax(0,1fr))}
.media-gallery[data-count="3"] .media-item:first-child{grid-row:span 2}
.media-gallery .photo-open:focus-visible{outline-offset:-4px}
dialog.photo-viewer{position:fixed;inset:0;width:100%;max-width:none;height:100%;height:100dvh;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:#080a0af5;overflow:hidden;overscroll-behavior:none}
.photo-viewer[open]{display:flex;flex-direction:column}
.photo-viewer::backdrop{background:#000d}
.photo-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-shrink:0;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left));z-index:2;background:#111313}
.photo-toolbar>span{margin-right:auto;font-variant-numeric:tabular-nums;color:var(--muted)}
.photo-viewer button{min-width:44px;min-height:44px;border:1px solid #495049;border-radius:9px;background:#252b25;color:var(--text);font-size:18px;touch-action:manipulation}
.photo-viewer button:disabled{cursor:default;opacity:.35}
.photo-toolbar button:last-child{font-size:14px;padding:0 14px}
.photo-stage{position:relative;display:flex;align-items:center;justify-content:center;flex:1;min-height:0;overflow:hidden;touch-action:none;overscroll-behavior:none;user-select:none;padding:16px 60px max(16px,env(safe-area-inset-bottom))}
.photo-stage img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;transform-origin:center;flex-shrink:0;user-select:none;-webkit-user-drag:none}
.photo-stage.zoomed{cursor:grab}.photo-stage.zoomed:active{cursor:grabbing}
.photo-error{max-width:360px;text-align:center;color:var(--muted)}
.photo-prev,.photo-next{position:absolute;top:50%;z-index:2;font-size:32px!important;width:44px;height:52px}
.photo-prev{left:max(8px,env(safe-area-inset-left))}.photo-next{right:max(8px,env(safe-area-inset-right))}
.photo-footer{display:contents}.photo-close-bottom{display:none}
.tweet-text a{font-size:inherit;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
@media(max-width:650px){
 .photo-toolbar{gap:8px}.photo-toolbar button{min-width:44px}
 .photo-close-top{display:none}
 .photo-stage{padding:12px 8px}
 .photo-footer{display:flex;align-items:center;gap:12px;flex-shrink:0;padding:12px max(16px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));border-top:1px solid var(--line);background:#111313}
 .photo-footer .photo-close-bottom{display:block;flex:1;min-height:48px;font-size:15px;font-weight:600}
 .photo-footer .photo-prev,.photo-footer .photo-next{position:static;width:48px;height:48px;flex-shrink:0}
}

/* Compact feed header and one shared search entry point. */
.topbar{height:auto;min-height:96px;padding:16px 0;align-items:center;flex-wrap:wrap}
.header-feed{flex:1 1 180px;min-width:0}
.header-feed h1{font-size:23px;font-weight:500;letter-spacing:-.5px;margin:0}
.header-feed p{font-size:11px;line-height:1.5;margin:6px 0 0;max-width:380px}
.header-actions{flex-wrap:wrap;gap:8px}
.header-actions .primary{padding:10px 12px;font-size:12px}
.feed-meta{display:flex;align-items:center;gap:12px;min-height:48px;padding:10px 0}
.search-clear{border:1px solid var(--line);border-radius:20px;background:var(--panel);color:var(--accent);padding:5px 10px;font-size:11px;max-width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#search-dialog{width:min(480px,calc(100% - 28px))}
#search-form>label{margin-bottom:8px}
#search-query{margin:0}
.search-actions{display:flex;gap:10px;margin-top:20px}
.search-actions .primary,.search-actions .secondary{flex:1;width:auto;margin:0}
#search-error{color:#ffb3a0}
@media(max-width:650px){
 .topbar{min-height:0;gap:12px;padding:14px 0}
 .header-feed{flex-basis:100%}
 .header-feed h1{font-size:21px}
 .header-feed p{max-width:none;margin-top:4px}
 .header-actions{width:100%;margin:0;flex-wrap:nowrap;justify-content:flex-end}
 .feed-meta{flex-wrap:wrap;gap:8px}
 .header-profile span{display:inline}
 .feed-meta{min-height:42px}
}
#refresh{white-space:nowrap;font-size:12px}
#refresh[hidden]{display:none}
@media(max-width:650px){#refresh{display:none}}
.pull-refresh{position:fixed;top:env(safe-area-inset-top,0px);left:50%;transform:translateX(-50%);z-index:40;width:max-content;max-width:calc(100% - 32px);padding:0 18px;background:var(--panel);border-radius:0 0 16px 16px;box-shadow:0 6px 20px #0005;height:0;overflow:hidden;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--accent);font-size:12px;visibility:hidden;pointer-events:none}
.pull-refresh.visible{visibility:visible}
.pull-refresh-icon{display:inline-block;font-size:24px}
.pull-refresh.loading .pull-refresh-icon{animation:refresh-spin 1s linear infinite}
@keyframes refresh-spin{to{transform:rotate(360deg)}}
@media(max-width:650px){html,body{overscroll-behavior-y:none}}
@media(min-width:651px){.pull-refresh{display:none}}
@media(prefers-reduced-motion:reduce){.pull-refresh.loading .pull-refresh-icon{animation:none}}
.next-tweet{display:none}
@media(max-width:650px){
 .next-tweet{display:grid;place-items:center;position:fixed;z-index:25;right:calc(20px + env(safe-area-inset-right,0px));bottom:calc(96px + env(safe-area-inset-bottom,0px));width:44px;height:44px;padding:0;border:1px solid #d6f7b2;border-radius:50%;background:var(--accent);color:#1a2412;font-size:22px;box-shadow:0 4px 14px #0005;touch-action:manipulation}
 .next-tweet:active{transform:scale(.95)}
 body:has(.next-tweet:not([hidden])) #notice{bottom:calc(164px + env(safe-area-inset-bottom,0px))}
}
.grok-explanation{margin-top:12px;padding:14px;border:1px solid var(--muted);border-radius:10px;cursor:default;overflow-wrap:anywhere}
.grok-explanation p{white-space:pre-wrap;line-height:1.6;margin:8px 0}
.grok-wait-head{display:flex;align-items:center;gap:10px}
.grok-orb{position:relative;width:10px;height:10px;border-radius:50%;background:var(--accent);box-shadow:0 0 12px var(--accent);animation:grok-orb 1.6s ease-in-out infinite}
.grok-orb::after{content:'';position:absolute;inset:-5px;border-radius:50%;border:1px solid var(--accent);opacity:0;animation:grok-ring 1.6s ease-out infinite}
.grok-wait-label{font-size:13px;font-weight:600;background:linear-gradient(90deg,var(--muted) 0%,var(--muted) 35%,var(--text) 50%,var(--muted) 65%,var(--muted) 100%);background-size:250% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:grok-shine 2.2s linear infinite}
.grok-skeleton{display:grid;gap:9px;margin-top:14px}
.grok-skeleton span{height:9px;border-radius:5px;background:linear-gradient(90deg,var(--line) 0%,#3a4236 50%,var(--line) 100%);background-size:200% 100%;animation:grok-shine 1.6s ease-in-out infinite}
.grok-skeleton span:nth-child(2){width:88%;animation-delay:.15s}
.grok-skeleton span:nth-child(3){width:62%;animation-delay:.3s}
@keyframes grok-orb{50%{transform:scale(.75);opacity:.7}}
@keyframes grok-ring{0%{transform:scale(.6);opacity:.8}100%{transform:scale(1.6);opacity:0}}
@keyframes grok-shine{0%{background-position:100% 0}100%{background-position:-100% 0}}
@media (prefers-reduced-motion:reduce){.grok-orb,.grok-orb::after,.grok-wait-label,.grok-skeleton span{animation:none}.grok-wait-label{color:var(--muted)}}
.grok-live::after{content:'▍';margin-left:1px;animation:grok-caret 1s steps(1) infinite}
@keyframes grok-caret{50%{opacity:0}}
@media (prefers-reduced-motion:reduce){.grok-live::after{animation:none}}
.grok-explanation small{display:block;color:var(--muted);margin-top:10px}
.grok-diagram{max-width:100%;overflow-x:auto;padding:12px;background:rgba(127,127,127,.1);border-radius:7px;font:13px/1.6 Consolas,monospace;white-space:pre;overflow-wrap:normal}
.media-grid:not(.media-gallery) .media-item:has(video){min-height:150px}
#experiments-open{display:block;padding:12px;color:var(--accent);text-decoration:none;font-size:12px}

.post-actions{position:relative;display:flex;justify-content:flex-end;align-items:center}
.primary-actions{display:flex;align-items:center;gap:5px}
.post-actions .primary-actions .post-action{width:38px;height:38px}
.post-actions .primary-actions .reply-count-action{width:auto;min-width:38px;gap:6px;padding:8px 10px}
.reply-label{font-size:11px}
.action-tray{position:absolute;z-index:8;right:19px;top:50%;width:0;height:0;pointer-events:none}
.action-tray[hidden]{display:none}
.post-actions .action-tray .post-action{position:absolute;left:-21px;top:-21px;width:42px;height:42px;border:1px solid #46533d;border-radius:50%;background:#202720f2;color:var(--text);box-shadow:0 6px 18px #0009;backdrop-filter:blur(10px);pointer-events:auto;transform:translate(var(--x,0),var(--y,0));animation:radial-in .22s cubic-bezier(.2,.9,.3,1.25) both;animation-delay:var(--delay,0ms)}
.post-actions .action-tray .post-action:hover{background:#293223;color:var(--accent)}
.action-tray-toggle[aria-expanded=true]{color:var(--accent);background:#293223;border-radius:50%}
.action-tray-toggle svg{transition:transform .2s}.action-tray-toggle[aria-expanded=true] svg{transform:rotate(90deg)}
.post-actions .reply-count-action{color:var(--accent)}
@keyframes radial-in{from{opacity:0;transform:translate(0,0) scale(.3)}}
#reply-form{margin:18px 0 24px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#141915}
#reply-form label{display:block;margin:0 0 8px;color:var(--muted);font-size:12px}
#reply-text{display:block;width:100%;resize:vertical;min-height:74px;padding:11px 12px;border:1px solid #394339;border-radius:9px;background:#101411;color:var(--text);font:inherit;line-height:1.5}
#reply-text:focus{outline:2px solid var(--accent);outline-offset:1px}
.reply-compose-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px}
#reply-compose-status{font-size:11px;color:var(--muted)}
#reply-submit{padding:9px 14px}
@media(prefers-reduced-motion:reduce){.post-actions .action-tray .post-action{animation:none}.action-tray-toggle svg{transition:none}}
@media(hover:none) and (pointer:coarse){.post-actions:before{content:'Grok için kaydır ↔';margin-right:auto;color:var(--muted);font-size:10px;opacity:.8}}
#posts,#tweet-root,#reply-list,#profile-posts{overflow-x:clip}
.post.grok-swipe-active,.quote-card.grok-swipe-active{position:relative;transition:none;border-color:#91bd67;box-shadow:0 0 0 2px #91bd6730,0 12px 35px #0008}
.post.grok-swipe-ready,.quote-card.grok-swipe-ready{border-color:var(--accent);box-shadow:0 0 0 3px #c2ef8d44,0 12px 35px #0008}
.post.grok-swipe-settle,.quote-card.grok-swipe-settle{transition:transform .24s cubic-bezier(.2,.8,.2,1)}
.grok-swipe-feedback{position:absolute;z-index:9;top:50%;left:50%;display:flex;align-items:center;gap:9px;max-width:calc(100% - 24px);padding:11px 15px;border:1px solid #c2ef8d77;border-radius:999px;background:#182019ed;color:var(--text);font-size:12px;font-weight:600;box-shadow:0 8px 24px #0008;transform:translate(-50%,-50%);pointer-events:none;white-space:nowrap;backdrop-filter:blur(10px)}
.grok-swipe-arrow{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#c2ef8d;color:#1a2412;font-size:16px}
.grok-swipe-ready .grok-swipe-feedback{background:#293723;color:var(--accent)}
@media(prefers-reduced-motion:reduce){.post.grok-swipe-settle,.quote-card.grok-swipe-settle{transition:none}}

#compose-dialog{width:min(560px,calc(100% - 24px))}#compose-dialog textarea{display:block;width:100%;resize:vertical;min-height:140px;padding:14px;background:#111511;border:1px solid #3a4335;border-radius:8px;color:var(--text);font:inherit;line-height:1.6}#compose-dialog textarea:focus{outline:2px solid var(--accent);outline-offset:2px}.compose-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}.compose-footer span{font-size:11px;color:var(--muted)}#compose-status{min-height:1.5em;margin-bottom:0}
.compose-footer .primary{width:auto;margin-top:0}
.post .share-status,.quote-card .share-status{font-size:11px;color:var(--muted);text-align:right;margin:4px 0 0;overflow-wrap:anywhere}
.post-actions .download-video-action.ready{color:var(--accent);background:#293223}

/* Tab icons drawn as SVG so every tab renders the same size and weight on all platforms. */
.nav>.nav-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex-shrink:0}.nav-icon svg{width:21px;height:21px}
@media(max-width:650px){.sidebar .nav>.nav-icon{display:flex;width:auto;margin:0 auto}.sidebar .nav-icon svg{width:20px;height:20px}}
/* Dialog scroll areas take focus on open (keyboard scroll stays inside); no ring for this programmatic focus. */
#tweet-content:focus,#profile-dialog:focus{outline:none}
#profile-dialog{overscroll-behavior:contain}
a.secondary{display:inline-block;text-decoration:none;margin-left:6px}
/* Long feeds: skip style/layout/paint for posts off screen, so opening a dialog
   (which locks body scroll and relayouts the page) no longer stalls for seconds. */
#posts > .post,#profile-posts > .post{content-visibility:auto;contain-intrinsic-size:auto 420px}
.caught-up-end{border:1px dashed #384033;border-radius:14px;text-align:center;padding:28px 24px;margin:8px 0 14px}.caught-up-end .empty-icon{font-size:26px;margin-bottom:10px}.caught-up-end h3{font-size:16px;font-weight:500;margin:0}.caught-up-end p{font-size:12px;margin:8px auto 0;max-width:380px}
