/* chirpper web — app.css (build 8f31c2e) */
:root {
  --bg: #0e1116;
  --bg-2: #151a21;
  --bg-3: #1c232d;
  --line: #2a3340;
  --txt: #e7edf3;
  --txt-2: #8b98a5;
  --acc: #4f8ef7;
  --acc-hov: #3b7ce8;
  --like: #f91880;
  --repost: #00ba7c;
  --danger: #f4212e;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; }
body { background: var(--bg); color: var(--txt); font-family: var(--font); font-size: 15px; line-height: 1.4; min-height: 100%; }
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }

/* boot splash */
.boot-splash { height: 100vh; display: flex; flex-direction: column; gap: 18px; align-items: center; justify-content: center; }
.boot-bird { font-size: 44px; }
.boot-spin, .spinner { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--acc); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* layout */
.shell { display: grid; grid-template-columns: 250px minmax(0, 620px) 340px; gap: 0 24px; max-width: 1260px; margin: 0 auto; padding: 0 12px; }
.col-nav { position: sticky; top: 0; height: 100vh; padding: 14px 8px; display: flex; flex-direction: column; }
.col-main { border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-height: 100vh; }
.col-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 14px 0 40px; scrollbar-width: thin; }

/* left nav */
.brand { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; padding: 10px 12px 18px; letter-spacing: -.5px; }
.brand img { width: 30px; height: 30px; }
.nav-item { display: flex; align-items: center; gap: 16px; padding: 11px 14px; border-radius: 999px; font-size: 18px; color: var(--txt); position: relative; }
.nav-item:hover { background: var(--bg-3); text-decoration: none; }
.nav-item.active { font-weight: 700; }
.nav-item .ico { width: 24px; text-align: center; font-size: 20px; }
.nav-badge { position: absolute; left: 26px; top: 6px; background: var(--acc); color: #fff; font-size: 11px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.btn-chirp { margin: 16px 8px 0; background: var(--acc); color: #fff; border: 0; border-radius: 999px; padding: 14px; font-size: 16px; font-weight: 700; }
.btn-chirp:hover { background: var(--acc-hov); }
.nav-foot { margin-top: auto; padding: 12px; color: var(--txt-2); font-size: 12px; }
.nav-foot .online-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--repost); margin-right: 5px; }

/* main col */
.page-head { position: sticky; top: 0; z-index: 5; backdrop-filter: blur(12px); background: rgba(14,17,22,.82); border-bottom: 1px solid var(--line); padding: 13px 16px; font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 14px; }
.page-head .sub { font-size: 12px; font-weight: 400; color: var(--txt-2); display: block; }
.back-btn { background: none; border: 0; color: var(--txt); font-size: 18px; border-radius: 50%; width: 34px; height: 34px; }
.back-btn:hover { background: var(--bg-3); }

.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab { flex: 1; text-align: center; padding: 14px 0; color: var(--txt-2); font-weight: 600; cursor: pointer; background: none; border: 0; font-size: 15px; }
.tab:hover { background: var(--bg-2); }
.tab.on { color: var(--txt); position: relative; }
.tab.on::after { content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 56px; height: 4px; border-radius: 4px; background: var(--acc); }

/* compose teaser */
.compose { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.compose .fake-input { flex: 1; color: var(--txt-2); font-size: 19px; padding: 10px 0; cursor: text; }
.compose .btn-chirp { margin: 0; padding: 8px 18px; font-size: 14px; align-self: center; }

/* new posts pill */
.new-posts-pill { position: sticky; top: 58px; z-index: 4; display: flex; justify-content: center; height: 0; }
.new-posts-pill button { transform: translateY(8px); background: var(--acc); color: #fff; border: 0; border-radius: 999px; padding: 7px 16px; font-weight: 700; font-size: 13px; box-shadow: 0 4px 14px rgba(0,0,0,.4); }

/* post card */
.post { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.post:hover { background: rgba(255,255,255,.02); }
.post.live-in { animation: liveIn .5s ease; }
@keyframes liveIn { from { background: rgba(79,142,247,.18); } }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-3); }
.avatar.sm { width: 32px; height: 32px; }
.post-body { flex: 1; min-width: 0; }
.post-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.p-name { font-weight: 700; color: var(--txt); }
.p-name:hover { text-decoration: underline; }
.p-handle, .p-time { color: var(--txt-2); font-size: 14px; }
.badge-v { color: var(--acc); font-size: 14px; }
.repost-label { color: var(--txt-2); font-size: 13px; font-weight: 600; padding: 0 16px; padding-top: 10px; display: flex; gap: 8px; align-items: center; }
.post-text { margin-top: 2px; white-space: pre-wrap; word-wrap: break-word; }
.post-text a { color: var(--acc); }
.post-actions { display: flex; justify-content: space-between; max-width: 380px; margin-top: 10px; color: var(--txt-2); font-size: 13px; }
.pa { display: flex; align-items: center; gap: 7px; background: none; border: 0; color: var(--txt-2); font-size: 13px; border-radius: 999px; padding: 4px 8px; }
.pa:hover.reply { color: var(--acc); }
.pa:hover.rp { color: var(--repost); }
.pa:hover.like { color: var(--like); }
.quoted { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-top: 8px; font-size: 14px; }

/* thread */
.thread-main { padding: 16px; border-bottom: 1px solid var(--line); }
.thread-main .post-text { font-size: 21px; margin: 12px 0; }
.thread-meta { color: var(--txt-2); font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.thread-stats { display: flex; gap: 18px; padding: 12px 0 2px; font-size: 14px; color: var(--txt-2); }
.thread-stats b { color: var(--txt); }
.ancestor-line { border-left: 2px solid var(--line); margin-left: 37px; }

/* profile */
.prof-banner { height: 160px; }
.prof-row { padding: 0 16px; position: relative; }
.prof-avatar { width: 120px; height: 120px; border-radius: 50%; border: 4px solid var(--bg); margin-top: -60px; object-fit: cover; }
.prof-name { font-size: 20px; font-weight: 800; margin-top: 8px; }
.prof-handle { color: var(--txt-2); }
.prof-bio { margin: 10px 0; }
.prof-meta { color: var(--txt-2); font-size: 14px; display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.prof-counts { display: flex; gap: 18px; font-size: 14px; color: var(--txt-2); padding-bottom: 12px; }
.prof-counts b { color: var(--txt); }
.btn-follow { position: absolute; right: 16px; top: 14px; background: var(--txt); color: var(--bg); font-weight: 700; border: 0; border-radius: 999px; padding: 8px 18px; }

/* explore / trends */
.search-box { padding: 10px 16px; position: relative; }
.search-box input { width: 100%; background: var(--bg-3); border: 1px solid transparent; border-radius: 999px; color: var(--txt); padding: 11px 18px; font-size: 15px; outline: none; }
.search-box input:focus { border-color: var(--acc); background: var(--bg); }
.typeahead { position: absolute; left: 16px; right: 16px; top: 56px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; z-index: 8; box-shadow: 0 8px 30px rgba(0,0,0,.5); overflow: hidden; }
.typeahead .ta-row { padding: 10px 14px; cursor: pointer; font-size: 14px; }
.typeahead .ta-row:hover { background: var(--bg-3); }
.trend-row { padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.trend-row:hover { background: rgba(255,255,255,.02); }
.trend-rank { color: var(--txt-2); font-size: 12px; }
.trend-tag { font-weight: 700; font-size: 15px; }
.trend-n { color: var(--txt-2); font-size: 13px; }

/* sidebar */
.side-card { background: var(--bg-2); border-radius: 16px; margin-bottom: 16px; overflow: hidden; }
.side-card h3 { padding: 14px 16px 6px; font-size: 18px; }
.side-card .show-more { display: block; padding: 12px 16px; font-size: 14px; }
.who-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.who-row:hover { background: var(--bg-3); cursor: pointer; }
.who-meta { flex: 1; min-width: 0; }
.who-meta .n { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-meta .h { color: var(--txt-2); font-size: 13px; }
.btn-follow-sm { background: var(--txt); color: var(--bg); border: 0; border-radius: 999px; font-weight: 700; font-size: 13px; padding: 6px 14px; }
.side-foot { color: var(--txt-2); font-size: 12px; padding: 4px 8px 30px; line-height: 1.9; }
.side-foot a { color: var(--txt-2); margin-right: 10px; }
.live-ticker { padding: 8px 16px 14px; color: var(--txt-2); font-size: 13px; min-height: 20px; }
.live-ticker .t-ev { animation: liveIn .6s ease; display: block; }

/* static pages */
.static-page { padding: 24px; max-width: 600px; }
.static-page h1 { margin-bottom: 14px; font-size: 26px; }
.static-page h2 { margin: 22px 0 8px; font-size: 18px; }
.static-page p, .static-page li { color: var(--txt-2); margin-bottom: 10px; font-size: 15px; }
.static-page ul { padding-left: 22px; }
.static-page code { background: var(--bg-3); padding: 2px 6px; border-radius: 5px; font-size: 13px; color: var(--txt); }

/* settings */
.settings-row { padding: 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.settings-row .lbl b { display: block; }
.settings-row .lbl span { color: var(--txt-2); font-size: 13px; }
.toggle { width: 44px; height: 24px; background: var(--bg-3); border-radius: 999px; border: 1px solid var(--line); position: relative; opacity: .55; }
.toggle::after { content: ""; position: absolute; width: 18px; height: 18px; background: var(--txt-2); border-radius: 50%; top: 2px; left: 3px; }

/* modal */
.modal-scrim { position: fixed; inset: 0; background: rgba(91,112,131,.4); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: var(--bg); border-radius: 18px; width: min(440px, 92vw); padding: 30px; position: relative; box-shadow: 0 10px 50px rgba(0,0,0,.6); }
.modal h2 { margin-bottom: 8px; }
.modal p { color: var(--txt-2); margin-bottom: 18px; font-size: 14px; }
.modal input { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 13px; color: var(--txt); font-size: 15px; margin-bottom: 12px; outline: none; }
.modal input:focus { border-color: var(--acc); }
.modal .btn-chirp { width: 100%; margin: 6px 0 0; }
.modal .m-close { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: var(--txt-2); font-size: 20px; }
.modal .m-err { color: var(--danger); font-size: 13px; margin-top: 10px; display: none; }

/* cookie banner */
.cookie-bar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg-2); border-top: 1px solid var(--line); padding: 14px 20px; display: flex; gap: 16px; align-items: center; justify-content: center; z-index: 60; font-size: 14px; color: var(--txt-2); flex-wrap: wrap; }
.cookie-bar button { border-radius: 999px; padding: 8px 18px; font-weight: 700; border: 1px solid var(--line); background: none; color: var(--txt); }
.cookie-bar button.primary { background: var(--txt); color: var(--bg); border: 0; }

/* toast */
.toast { position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%); background: var(--acc); color: #fff; padding: 10px 20px; border-radius: 8px; font-size: 14px; z-index: 70; animation: liveIn .3s ease; }

/* skeletons + spinners */
.skel { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; }
.skel .s-av { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-3); animation: pulse 1.2s ease infinite; }
.skel .s-lines { flex: 1; }
.skel .s-line { height: 12px; border-radius: 6px; background: var(--bg-3); margin-bottom: 8px; animation: pulse 1.2s ease infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.feed-loading { display: flex; justify-content: center; padding: 26px; }
.feed-end { text-align: center; color: var(--txt-2); padding: 30px; font-size: 14px; }
.err-box { margin: 20px; padding: 16px; border: 1px solid var(--danger); border-radius: 10px; color: var(--danger); font-size: 14px; }

@media (max-width: 1080px) { .shell { grid-template-columns: 72px minmax(0, 620px) 300px; } .nav-item span.lbl, .brand span, .nav-foot, .btn-chirp span { display: none; } .btn-chirp { padding: 12px; } }
@media (max-width: 820px) { .shell { grid-template-columns: 64px minmax(0, 1fr); } .col-side { display: none; } }
