/* GjhkyioSocial - 2021-style Recreation (Jul 2021: sidebar + hearts + 280) */
/* HISTORICAL_2021_MODE = TRUE */

:root {
  --blue: #1d9bf0;
  --blue-dark: #1a8cd8;
  --blue-soft: #e8f5fd;
  --ink: #0f1419;
  --gray: #536471;
  --border: #eff3f4;
  --bg-soft: #f7f9f9;
  --pink: #f91880;
  --pink-soft: #fdeef4;
  --green: #00ba7c;
  --green-soft: #e6f7f0;
  --error: #f4212e;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.tw2021 {
  background: #fff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
}
a { color: #1b95e0; text-decoration: none; }
a:visited { color: #1b95e0; }
a:hover { text-decoration: underline; }
.dm-bubble.mine a, .dm-bubble.mine a:visited { color: #fff; text-decoration: underline; }
.hidden { display: none !important; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: var(--blue); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 999; }

/* ============ APP LAYOUT ============ */
#layout { display: flex; justify-content: center; width: 1265px; max-width: 100%; margin: 0 auto; min-height: 100vh; }
#sidebar { width: 275px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 4px 12px; position: sticky; top: 0; height: 100vh; }
.side-nav { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.side-logo { display: inline-flex; padding: 12px; border-radius: 9999px; }
.side-logo:hover { background: var(--blue-soft); }
.g-logo { width: 30px; height: 30px; }
.side-nav nav { display: flex; flex-direction: column; align-items: flex-start; width: 100%; }
.side-nav-item {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px 10px 12px; margin: 2px 0; border-radius: 9999px;
  color: var(--ink); font-size: 20px; line-height: 24px; text-decoration: none;
  background: none; border: none; cursor: pointer; font-family: inherit; width: auto;
}
.side-nav-item:hover { background: rgba(15,20,25,0.1); text-decoration: none; }
.side-nav-item.active { font-weight: 800; }
.side-nav-item.active .snav-ico { color: var(--ink); }
.snav-ico { width: 26px; height: 26px; display: inline-flex; flex-shrink: 0; }
.snav-ico svg { width: 26px; height: 26px; }
.tweet-btn-big {
  margin: 12px 0; width: 90%; padding: 14px 0; border: none; border-radius: 9999px;
  background: var(--blue); color: #fff; font-size: 17px; font-weight: 700; cursor: pointer;
  box-shadow: rgba(0,0,0,0.08) 0 8px 28px;
}
.tweet-btn-big:hover { background: var(--blue-dark); }
.side-more-wrap { position: relative; }
.pop-menu {
  position: absolute; bottom: 8px; left: 0; min-width: 200px; background: #fff;
  border-radius: 16px; box-shadow: rgba(101,119,134,0.2) 0 0 15px, rgba(101,119,134,0.15) 0 0 3px 1px;
  padding: 8px 0; z-index: 200;
}
.pop-menu a, .pop-menu button {
  display: block; width: 100%; text-align: left; padding: 12px 16px; font-size: 15px; font-weight: 700;
  color: var(--ink); background: none; border: none; cursor: pointer; font-family: inherit; text-decoration: none;
}
.pop-menu a:hover, .pop-menu button:hover { background: var(--bg-soft); text-decoration: none; }
.side-account { position: relative; margin: 12px 0; }
#sidebarAccount {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px;
  border: none; border-radius: 9999px; background: none; cursor: pointer; font-family: inherit;
  color: var(--ink);
}
#sidebarAccount:hover { background: rgba(15,20,25,0.1); }
#sidebarAccount img, #accountAvatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #cfd9de; }
.side-account-names { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; flex: 1; }
.side-account-names strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.side-account-names span { font-size: 14px; color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.side-account-dots { font-weight: 800; letter-spacing: 1px; }
.side-account .pop-menu { bottom: 60px; }

/* ============ CENTER COLUMN ============ */
#maincol { width: 600px; flex-shrink: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); min-height: 100vh; background: #fff; }
body[data-theme="dim"] #maincol { background: #15202b; }
body[data-theme="black"] #maincol { background: #000; }
body.wide-main #maincol { width: 990px; }
.pageview { min-height: 60vh; }
.col-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.85); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: space-between; padding: 10px 16px;
}
.col-header h2 { margin: 0; font-size: 20px; font-weight: 800; }
.col-sub { font-size: 13px; color: var(--gray); }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none; background: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink); flex-shrink: 0;
}
.icon-btn:hover { background: rgba(15,20,25,0.1); }
.icon-btn svg { width: 20px; height: 20px; }
.profile-backhead { justify-content: flex-start; gap: 20px; }

/* Tabs */
.tabs2021 { display: flex; border-bottom: 1px solid var(--border); }
.tab2021 {
  flex: 1; padding: 14px 8px; background: none; border: none; cursor: pointer;
  font-size: 15px; font-weight: 500; color: var(--gray); font-family: inherit; position: relative;
}
.tab2021:hover { background: rgba(15,20,25,0.06); }
.tab2021.active { color: var(--ink); font-weight: 800; }
.tab2021.active::after { content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 56px; height: 4px; border-radius: 9999px; background: var(--blue); }

/* Composer */
.composer { display: flex; gap: 12px; padding: 12px 16px 4px; border-bottom: 1px solid var(--border); }
.composer .avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #cfd9de; flex-shrink: 0; cursor: pointer; }
.composer-main { flex: 1; min-width: 0; }
.explore-search, .tweet-main, .dm-preview, .user-card-main, .wtf-main, .settings-content, .dm-conversation { min-width: 0; }
.tweet-text { overflow-wrap: anywhere; }
.profile-name-row { overflow: hidden; }
.profile-name-row #profileName { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audience-pill { display: inline-block; border: 1px solid #cfd9de; color: var(--blue); font-size: 14px; font-weight: 700; border-radius: 9999px; padding: 1px 12px; margin-bottom: 4px; }
.composer textarea {
  width: 100%; border: none; outline: none; resize: none; font-family: inherit;
  font-size: 20px; line-height: 24px; padding: 8px 0; color: var(--ink); background: transparent;
}
.composer textarea::placeholder { color: var(--gray); }
.reply-scope { color: var(--blue); font-size: 14px; font-weight: 700; padding: 2px 0 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.composer-bar { display: flex; align-items: center; gap: 4px; padding: 6px 0 10px; }
.composer-icons { display: flex; gap: 2px; color: var(--blue); flex: 1; }
.composer-icons span { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.composer-icons svg { width: 20px; height: 20px; }
.char-count { font-size: 13px; color: var(--gray); margin-right: 8px; }
.char-count.warn { color: #ffd400; font-weight: 700; }
.char-count.over { color: var(--error); font-weight: 700; }
.tweet-btn {
  background: var(--blue); color: #fff; border: none; border-radius: 9999px;
  font-size: 15px; font-weight: 700; padding: 8px 18px; cursor: pointer; font-family: inherit;
}
.tweet-btn:hover:not(:disabled) { background: var(--blue-dark); }
.tweet-btn:disabled { opacity: 0.5; cursor: default; }
.btn-outline {
  background: transparent; color: var(--blue); border: 1px solid #cfd9de; border-radius: 9999px;
  font-size: 15px; font-weight: 700; padding: 7px 16px; cursor: pointer; font-family: inherit;
}
.btn-outline:hover { background: var(--blue-soft); }
.btn-follow2021 {
  background: #0f1419; color: #fff; border: 1px solid #0f1419; border-radius: 9999px;
  font-size: 14px; font-weight: 700; padding: 7px 16px; cursor: pointer; font-family: inherit;
}
.btn-follow2021:hover { background: #272c30; border-color: #272c30; }
.btn-follow2021.following { background: transparent; color: var(--ink); border: 1px solid #cfd9de; }
.btn-follow2021.following:hover { color: var(--error); border-color: #fdc9ce; background: rgba(244,33,46,0.08); }

/* ============ TWEETS (2021 article) ============ */
.timeline { background: transparent; }
.tweet { border-bottom: 1px solid var(--border); padding: 12px 16px; cursor: pointer; transition: background 0.15s; }
.tweet:hover { background: rgba(0,0,0,0.02); }
.rt-label { display: flex; align-items: center; gap: 8px; color: var(--gray); font-size: 13px; font-weight: 700; margin: 0 0 4px 28px; }
.rt-label svg { width: 16px; height: 16px; }
.tweet-body { display: flex; gap: 12px; }
.tweet .avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #cfd9de; flex-shrink: 0; }
.tweet-main { flex: 1; min-width: 0; }
.tweet-header { display: flex; align-items: center; gap: 4px; min-width: 0; }
.tweet-header .fullname { font-weight: 800; font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tweet-header .fullname:hover { text-decoration: underline; }
.verified { width: 18px; height: 18px; display: inline-flex; flex-shrink: 0; }
.verified svg { width: 18px; height: 18px; }
.tweet-header .username, .tweet-header .time { color: var(--gray); font-size: 15px; white-space: nowrap; }
.tweet-header .username { overflow: hidden; text-overflow: ellipsis; }
.tweet-header .time:hover { text-decoration: underline; }
.tweet-more { margin-left: auto; border: none; background: none; color: var(--gray); font-weight: 800; letter-spacing: 1px; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; flex-shrink: 0; }
.tweet-more:hover { background: var(--blue-soft); color: var(--blue); }
.tweet-text { font-size: 15px; line-height: 20px; margin: 2px 0 0; word-wrap: break-word; white-space: pre-wrap; }
.tweet-text.tweet-text-large { font-size: 23px; line-height: 28px; }
.tweet-text a { color: #1b95e0; }
.tweet-actions { display: flex; justify-content: space-between; max-width: 425px; margin-top: 8px; }
.tact {
  display: flex; align-items: center; gap: 2px; background: none; border: none; cursor: pointer;
  color: var(--gray); font-size: 13px; font-family: inherit; padding: 0;
}
.tact .tact-ico { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-left: -8px; transition: background 0.15s; }
.tact svg { width: 18px; height: 18px; }
.tact.reply:hover { color: var(--blue); } .tact.reply:hover .tact-ico { background: var(--blue-soft); }
.tact.retweet:hover { color: var(--green); } .tact.retweet:hover .tact-ico { background: var(--green-soft); }
.tact.like:hover { color: var(--pink); } .tact.like:hover .tact-ico { background: var(--pink-soft); }
.tact.share:hover { color: var(--blue); } .tact.share:hover .tact-ico { background: var(--blue-soft); }
.tact.retweet.on { color: var(--green); font-weight: 700; }
.tact.like.on { color: var(--pink); font-weight: 700; }
.tact.like.on svg path.heart-fill { fill: var(--pink); }
.tweet-expanded { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.expanded-date { color: var(--gray); font-size: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.expanded-date a { color: var(--ink); font-weight: 700; }
.stats-row { display: flex; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 15px; color: var(--gray); }
.stats-row strong { color: var(--ink); }
.expanded-btns { display: flex; gap: 10px; padding-top: 10px; }

/* User cards / trends / wtf */
.user-card { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.user-card:hover { background: rgba(0,0,0,0.02); }
.user-card .avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #cfd9de; flex-shrink: 0; cursor: pointer; }
.user-card-main { flex: 1; min-width: 0; }
.user-card-main .fullname { font-weight: 800; color: var(--ink); }
.user-card-main .fullname:hover { text-decoration: underline; }
.user-card-main .username { color: var(--gray); }
.user-card-bio { font-size: 15px; margin-top: 2px; }
.trend-row { display: block; padding: 10px 16px; color: var(--ink); }
.trend-row:hover { background: rgba(0,0,0,0.02); text-decoration: none; }
.trend-cat, .trend-count { font-size: 13px; color: var(--gray); }
.trend-name { font-size: 15px; font-weight: 700; }
.wtf-row { display: flex; gap: 12px; padding: 10px 16px; align-items: center; }
.wtf-row:hover { background: rgba(0,0,0,0.02); }
.wtf-row .avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #cfd9de; cursor: pointer; }
.wtf-main { flex: 1; min-width: 0; }
.wtf-main .fullname { font-weight: 800; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.wtf-main .fullname:hover { text-decoration: underline; }
.wtf-main .username { color: var(--gray); }
.notif-row { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 15px; }
.notif-row:hover { background: rgba(0,0,0,0.02); }
.notif-ico { width: 32px; height: 32px; flex-shrink: 0; }
.notif-row .time { color: var(--gray); font-size: 14px; }

/* Right sidebar */
#rightbar { width: 350px; flex-shrink: 0; padding: 4px 0 0 28px; }
.right-search { position: sticky; top: 0; background: #fff; padding: 4px 0 8px; display: flex; align-items: center; gap: 10px; background: var(--bg-soft); border: 1px solid transparent; border-radius: 9999px; padding: 10px 16px; margin-bottom: 12px; }
.right-search:focus-within { border-color: var(--blue); }
body[data-theme="light"] .right-search:focus-within { background: #fff; }
.right-search svg { width: 18px; height: 18px; color: var(--gray); flex-shrink: 0; }
.right-search input { border: none; outline: none; background: transparent; font-size: 15px; width: 100%; font-family: inherit; }
.side-card { background: var(--bg-soft); border-radius: 16px; margin-bottom: 16px; overflow: hidden; }
.side-card h3 { margin: 0; font-size: 20px; font-weight: 800; padding: 12px 16px; }
.show-more { display: block; width: 100%; text-align: left; background: none; border: none; color: var(--blue); font-size: 15px; padding: 14px 16px; cursor: pointer; font-family: inherit; }
.show-more:hover { background: rgba(0,0,0,0.03); }
.side-footer { font-size: 13px; color: var(--gray); padding: 0 16px; line-height: 24px; }
.side-footer a { color: var(--gray); margin-right: 10px; }

/* Explore */
.explore-header { gap: 12px; }
.explore-search { flex: 1; display: flex; align-items: center; gap: 10px; background: var(--bg-soft); border: 1px solid transparent; border-radius: 9999px; padding: 9px 16px; }
.explore-search:focus-within { border-color: var(--blue); }
body[data-theme="light"] .explore-search:focus-within { background: #fff; }
.explore-search svg { width: 18px; height: 18px; color: var(--gray); }
.explore-search input { border: none; outline: none; background: transparent; font-size: 15px; width: 100%; font-family: inherit; }
.explore-hero { font-size: 20px; font-weight: 800; padding: 12px 16px 4px; }

/* Profile */
.profile-banner { height: 200px; background: #cfd9de url('/img/banner_default.png') center/cover; }
.profile-toprow { display: flex; justify-content: space-between; align-items: flex-start; padding: 0 16px; }
.profile-avatar { width: 133px; height: 133px; border-radius: 50%; border: 4px solid #fff; margin-top: -67px; object-fit: cover; background: #cfd9de; }
.profile-actions { display: flex; gap: 8px; padding-top: 12px; align-items: center; }
.profile-info { padding: 4px 16px 0; }
.profile-name-row { display: flex; align-items: center; gap: 4px; font-size: 20px; font-weight: 800; }
.profile-screen { color: var(--gray); font-size: 15px; }
.profile-bio { margin-top: 10px; white-space: pre-wrap; word-wrap: break-word; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--gray); font-size: 15px; margin-top: 10px; }
.profile-meta a { color: var(--blue); }
.profile-stats { display: flex; gap: 18px; margin-top: 10px; font-size: 15px; color: var(--gray); }
.profile-stats a { color: var(--gray); }
.profile-stats a:hover { text-decoration: underline; }
.profile-stats strong { color: var(--ink); }
.profile-tabs { border-top: none; }

/* Messages */
.dm-layout { display: flex; height: calc(100vh - 53px); }
.dm-list { width: 350px; flex-shrink: 0; border-right: 1px solid var(--border); overflow-y: auto; }
.dm-item { display: flex; gap: 12px; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--border); }
.dm-item:hover { background: rgba(0,0,0,0.02); }
.dm-item.active { background: var(--bg-soft); border-right: 2px solid var(--blue); }
.dm-item .avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #cfd9de; }
.dm-preview { flex: 1; min-width: 0; }
.dm-name { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-name span { font-weight: 400; color: var(--gray); }
.dm-text { color: var(--gray); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-conversation { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dm-header { padding: 10px 16px; border-bottom: 1px solid var(--border); }
.dm-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; background: transparent; }
.dm-bubble { max-width: 75%; padding: 10px 14px; border-radius: 20px; font-size: 15px; line-height: 20px; word-wrap: break-word; }
.dm-bubble.mine { background: var(--blue); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.dm-bubble.theirs { background: var(--bg-soft); align-self: flex-start; border-bottom-left-radius: 4px; }
.dm-time { font-size: 12px; opacity: 0.75; margin-top: 4px; }
.dm-compose { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--border); }
.dm-compose textarea { flex: 1; border: none; outline: none; resize: none; background: var(--bg-soft); border-radius: 20px; padding: 10px 16px; font-size: 15px; font-family: inherit; }
.newmsg-form { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.newmsg-form input { border: 1px solid #cfd9de; border-radius: 8px; padding: 8px 12px; font-size: 15px; font-family: inherit; outline: none; }
.newmsg-form input:focus { border-color: var(--blue); }
.newmsg-btns { display: flex; gap: 8px; }

/* Lists */
.lists-create { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.lists-create h3 { margin: 0; font-size: 17px; font-weight: 800; }
.lists-create input, .lists-create textarea { border: 1px solid #cfd9de; border-radius: 8px; padding: 8px 12px; font-size: 15px; font-family: inherit; outline: none; resize: none; }
.lists-create input:focus, .lists-create textarea:focus { border-color: var(--blue); }
.radio-row { font-size: 15px; display: flex; align-items: center; gap: 6px; }
.list-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.list-card:hover { background: rgba(0,0,0,0.02); }
.list-name { font-weight: 800; font-size: 15px; }
.list-desc { color: var(--gray); font-size: 14px; }
.list-meta { color: var(--gray); font-size: 13px; }
.list-card-btns { display: flex; gap: 8px; flex-shrink: 0; }

/* Settings 2021 */
.settings-layout { display: flex; min-height: 60vh; }
.settings-nav { width: 200px; flex-shrink: 0; border-right: 1px solid var(--border); padding: 8px 0; display: flex; flex-direction: column; }
.settings-nav-item { text-align: left; background: none; border: none; padding: 12px 16px; font-size: 15px; color: var(--ink); cursor: pointer; font-family: inherit; border-right: 3px solid transparent; }
.settings-nav-item:hover { background: var(--bg-soft); }
.settings-nav-item.active { font-weight: 800; border-right-color: var(--blue); }
.settings-session { margin-top: auto; padding: 12px 16px; font-size: 13px; color: var(--gray); display: flex; flex-direction: column; gap: 8px; }
.settings-content { flex: 1; padding: 4px 24px 24px; min-width: 0; }
.settings-content h3 { font-size: 20px; font-weight: 800; margin: 12px 0; }
.settings-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 15px; color: var(--gray); }
.settings-row strong { color: var(--ink); }
.session-row { font-size: 13px; }
.settings-label { display: block; font-size: 14px; font-weight: 700; margin: 14px 0 4px; }
.text-input { width: 100%; max-width: 380px; border: 1px solid #cfd9de; border-radius: 4px; padding: 8px 12px; font-size: 15px; font-family: inherit; outline: none; background: #fff; }
.text-input:focus { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
textarea.text-input { resize: vertical; }
select.text-input { width: auto; }
.settings-hint { font-size: 13px; color: var(--gray); margin: 4px 0 8px; }
.settings-hint a { color: var(--blue); }
.settings-content .tweet-btn { margin-top: 10px; }

/* States */
.empty-state { padding: 32px 16px; text-align: center; color: var(--gray); font-size: 15px; }
.empty-state h3 { color: var(--ink); font-size: 23px; margin: 0 0 8px; }
.form-error { background: #fdeef0; border: 1px solid #f8a9b8; color: #a50e2e; padding: 10px 14px; border-radius: 12px; font-size: 14px; margin: 10px 0; }
.form-success { background: var(--green-soft); border: 1px solid #7fe0b8; color: #0a6b45; padding: 10px 14px; border-radius: 12px; font-size: 14px; margin: 10px 0; }
.front-warning { background: #fff8e1; border: 1px solid #ffe082; border-radius: 12px; padding: 12px 16px; margin: 12px; color: #0f1419; }
.front-warning h3 { margin: 0 0 4px; font-size: 15px; color: #0f1419; }
.front-warning p { margin: 0; font-size: 14px; color: #536471; }
.front-warning a { color: #1b95e0; }
.alert-messages { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 500; }
.alert-messages .message { background: var(--blue); color: #fff; border-radius: 8px; padding: 10px 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.alert-messages .message-inside { display: flex; gap: 12px; align-items: center; }
.alert-messages .dismiss { color: #fff; font-size: 18px; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(91,112,131,0.4); display: none; align-items: flex-start; justify-content: center; z-index: 300; padding-top: 5vh; }
.modal-overlay.open { display: flex; }
.modal-tweet { width: 600px; max-width: 94vw; background: #fff; border-radius: 16px; padding: 8px 16px 12px; }
.modal-top { display: flex; }
.modal-row { display: flex; gap: 12px; margin-top: 4px; }
.modal-row img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #cfd9de; }
.modal-row textarea { flex: 1; border: none; outline: none; resize: none; font-size: 20px; font-family: inherit; padding: 8px 0; }
.modal-bar { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 6px; }
.modal-bar .composer-icons { flex: 1; }

/* ============ LOGGED-OUT: simple login card ============ */
#view-login { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg-soft); }
#view-login.hidden { display: none !important; }
.auth-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 32px 16px; }
.auth-card {
  width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--border);
  border-radius: 16px; padding: 24px 28px; box-shadow: rgba(101,119,134,0.15) 0 4px 20px;
}
.g-auth { display: flex; justify-content: center; margin-bottom: 8px; }
.g-auth svg { width: 40px; height: 40px; }
.auth-card h1 { font-size: 23px; font-weight: 800; margin: 0 0 16px; text-align: center; }
.auth-card h2 { font-size: 17px; font-weight: 800; margin: 0 0 10px; text-align: center; }
.auth-card label { display: block; font-size: 13px; font-weight: 700; color: var(--gray); margin: 10px 0 4px; }
.auth-card input {
  width: 100%; border: 1px solid #cfd9de; border-radius: 4px; padding: 10px 12px;
  font-size: 15px; font-family: inherit; outline: none; background: #fff;
}
.auth-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.auth-btn {
  width: 100%; margin-top: 14px; padding: 10px 0; border-radius: 9999px;
  font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.auth-btn-primary { background: var(--blue); border: 1px solid var(--blue); color: #fff; }
.auth-btn-primary:hover { background: var(--blue-dark); }
.auth-btn-secondary { background: transparent; border: 1px solid #cfd9de; color: var(--blue); }
.auth-btn-secondary:hover { background: var(--blue-soft); }
.auth-remember { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--gray); margin-top: 10px; }
.auth-remember label { display: flex; align-items: center; gap: 5px; margin: 0; font-weight: 400; }
.auth-remember input { width: auto; }
.auth-demo a { color: var(--blue); }
.auth-legal { font-size: 11px; color: var(--gray); text-align: center; margin-top: 10px; }
.auth-demo { font-size: 13px; color: var(--gray); text-align: center; margin-top: 8px; }
.auth-reset { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.auth-reset-title { font-weight: 800; font-size: 15px; }
.auth-footer { padding: 16px; font-size: 13px; color: var(--gray); text-align: center; line-height: 24px; }
.auth-footer a { color: var(--gray); margin: 0 7px; }
.auth-footer a:hover { color: var(--blue); }

/* ============ 2021 EVERYTHING PACK: themes, front, signup, composer extras, fleets, spaces, polls, media ============ */
body[data-theme="dim"] {
  --ink: #f7f9f9; --gray: #8b98a5; --border: #2f3336; --bg-soft: #16181c;
  background: #15202b; color: var(--ink);
}
body[data-theme="dim"] #maincol, body[data-theme="dim"] .modal-tweet, body[data-theme="dim"] .pop-menu,
body[data-theme="dim"] .auth-card, body[data-theme="dim"] .login2018-right, body[data-theme="dim"] .login2018-footer { background: #15202b; }
body[data-theme="dim"] .col-header { background: rgba(21,32,43,0.85); }
body[data-theme="dim"] .composer textarea, body[data-theme="dim"] .modal-row textarea,
body[data-theme="dim"] .dm-compose textarea, body[data-theme="dim"] .right-search input,
body[data-theme="dim"] .explore-search input, body[data-theme="dim"] .text-input,
body[data-theme="dim"] .auth-card input, body[data-theme="dim"] .lists-create input,
body[data-theme="dim"] .lists-create textarea, body[data-theme="dim"] .newmsg-form input,
body[data-theme="dim"] .login2018-field input, body[data-theme="dim"] .login2018-signup input,
body[data-theme="dim"] .front-signup-box input, body[data-theme="dim"] #editProfileModal input,
body[data-theme="dim"] #editProfileModal textarea, body[data-theme="dim"] #signupModal input { background: #15202b; color: var(--ink); border-color: #333639; }
body[data-theme="dim"] .side-card, body[data-theme="dim"] .dm-bubble.theirs, body[data-theme="dim"] .right-search,
body[data-theme="dim"] .explore-search { background: #1e2732; }
body[data-theme="black"] {
  --ink: #e7e9ea; --gray: #71767b; --border: #2f3336; --bg-soft: #16181c;
  background: #000; color: var(--ink);
}
body[data-theme="black"] #maincol, body[data-theme="black"] .modal-tweet, body[data-theme="black"] .pop-menu,
body[data-theme="black"] .auth-card { background: #000; }
body[data-theme="black"] .col-header { background: rgba(0,0,0,0.85); }
body[data-theme="black"] .composer textarea, body[data-theme="black"] .modal-row textarea,
body[data-theme="black"] .dm-compose textarea, body[data-theme="black"] .right-search input,
body[data-theme="black"] .explore-search input, body[data-theme="black"] .text-input,
body[data-theme="black"] .auth-card input, body[data-theme="black"] .lists-create input,
body[data-theme="black"] .lists-create textarea, body[data-theme="black"] .newmsg-form input,
body[data-theme="black"] #editProfileModal input, body[data-theme="black"] #editProfileModal textarea,
body[data-theme="black"] #signupModal input { background: #000; color: var(--ink); border-color: #333639; }
body[data-theme="black"] .side-card, body[data-theme="black"] .dm-bubble.theirs, body[data-theme="black"] .right-search,
body[data-theme="black"] .explore-search { background: #16181c; }
body[data-theme="black"] .dm-compose textarea { background: #16181c; }
body[data-theme="dim"] .tweet:hover, body[data-theme="black"] .tweet:hover,
body[data-theme="dim"] .user-card:hover, body[data-theme="black"] .user-card:hover,
body[data-theme="dim"] .trend-row:hover, body[data-theme="black"] .trend-row:hover,
body[data-theme="dim"] .wtf-row:hover, body[data-theme="black"] .wtf-row:hover,
body[data-theme="dim"] .notif-row:hover, body[data-theme="black"] .notif-row:hover,
body[data-theme="dim"] .dm-item:hover, body[data-theme="black"] .dm-item:hover,
body[data-theme="dim"] .list-card:hover, body[data-theme="black"] .list-card:hover,
body[data-theme="dim"] .quote-embed:hover, body[data-theme="black"] .quote-embed:hover,
body[data-theme="dim"] .news-card:hover, body[data-theme="black"] .news-card:hover,
body[data-theme="dim"] .tab2021:hover, body[data-theme="black"] .tab2021:hover,
body[data-theme="dim"] .settings-nav-item:hover, body[data-theme="black"] .settings-nav-item:hover,
body[data-theme="dim"] .show-more:hover, body[data-theme="black"] .show-more:hover,
body[data-theme="dim"] .theme-card:hover, body[data-theme="black"] .theme-card:hover { background: rgba(255,255,255,0.03); }
body[data-theme="dim"] .side-nav-item:hover, body[data-theme="black"] .side-nav-item:hover,
body[data-theme="dim"] #sidebarAccount:hover, body[data-theme="black"] #sidebarAccount:hover,
body[data-theme="dim"] .icon-btn:hover, body[data-theme="black"] .icon-btn:hover { background: rgba(231,233,234,0.1); }
/* Safety net: every text field stays readable in dark themes (polls, scheduler, fleet composer, future inputs) */
body[data-theme="dim"] input, body[data-theme="dim"] textarea, body[data-theme="dim"] select,
body[data-theme="black"] input, body[data-theme="black"] textarea, body[data-theme="black"] select { color-scheme: dark; }
body[data-theme="dim"] input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
body[data-theme="dim"] textarea, body[data-theme="dim"] select { background: #15202b; color: #f7f9f9; border-color: #333639; }
body[data-theme="black"] input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
body[data-theme="black"] textarea, body[data-theme="black"] select { background: #000; color: #e7e9ea; border-color: #333639; }
body[data-theme="dim"] input::placeholder, body[data-theme="dim"] textarea::placeholder,
body[data-theme="black"] input::placeholder, body[data-theme="black"] textarea::placeholder { color: #71767b; opacity: 1; }
/* ...except fields designed transparent (search pills, composers) */
body[data-theme="dim"] .right-search input, body[data-theme="dim"] .explore-search input,
body[data-theme="dim"] .dm-compose textarea, body[data-theme="dim"] .composer textarea,
body[data-theme="dim"] .modal-row textarea, body[data-theme="dim"] .detail-reply textarea,
body[data-theme="black"] .right-search input, body[data-theme="black"] .explore-search input,
body[data-theme="black"] .dm-compose textarea, body[data-theme="black"] .composer textarea,
body[data-theme="black"] .modal-row textarea, body[data-theme="black"] .detail-reply textarea { background: transparent; border-color: transparent; }
.theme-cards { display: flex; gap: 10px; margin-top: 8px; }
.theme-card { flex: 1; display: flex; align-items: center; gap: 8px; padding: 12px; border: 2px solid var(--border); border-radius: 12px; background: none; color: var(--ink); font-weight: 700; cursor: pointer; font-family: inherit; }
.theme-card.active { border-color: var(--blue); }
.theme-dot { width: 22px; height: 22px; border-radius: 50%; display: inline-block; border: 1px solid #cfd9de; }
.theme-dot-light { background: #fff; } .theme-dot-dim { background: #15202b; } .theme-dot-black { background: #000; }

/* Front marketing split */
#view-front { min-height: 100vh; display: flex; flex-direction: column; }
#view-front.hidden { display: none !important; }
.front-split { display: flex; flex: 1; min-height: calc(100vh - 50px); }
.front-blue { flex: 1.1; background: #1da1f2; color: #fff; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.g-watermark { position: absolute; width: 150%; height: 150%; right: -30%; top: -25%; opacity: 0.15; }
.front-points { list-style: none; position: relative; z-index: 1; display: flex; flex-direction: column; gap: 28px; font-size: 19px; font-weight: 800; padding: 40px; margin: 0; }
.front-main { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 32px 48px; background: #fff; }
.front-main h1 { font-size: 40px; line-height: 46px; margin: 16px 0; }
.front-main h2 { font-size: 23px; margin: 0 0 16px; }
.front-cta { width: 100%; max-width: 380px; margin-top: 10px; }
body[data-theme="dim"] .front-main, body[data-theme="black"] .front-main { background: #15202b; }
body[data-theme="black"] .front-main { background: #000; }

/* Signup modal */
.signup-modal { padding: 12px 24px 24px; }
.signup-modal h2 { font-size: 23px; margin: 8px 0 16px; }
.signup-modal label { display: block; font-size: 14px; font-weight: 700; color: var(--gray); margin: 12px 0 4px; }
.signup-modal input { width: 100%; border: 1px solid #cfd9de; border-radius: 4px; padding: 10px 12px; font-size: 15px; font-family: inherit; outline: none; }
.signup-modal input:focus { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.signup-step { font-size: 15px; font-weight: 800; margin-left: 8px; }
.su-muted { color: var(--gray); }
.su-check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; color: var(--ink) !important; }
.su-check input { width: auto !important; margin-top: 4px; }
.su-nav { display: flex; gap: 10px; margin-top: 18px; }
.su-nav .auth-btn { margin-top: 0; }
.su-next { flex: 1; }
.su-review { border: 1px solid var(--border); border-radius: 12px; padding: 12px; font-size: 15px; line-height: 26px; }

/* Composer extras */
.composer-icons button { width: 34px; height: 34px; border-radius: 50%; border: none; background: none; color: var(--blue); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.composer-icons button:hover { background: var(--blue-soft); }
.composer-icons button svg { width: 20px; height: 20px; }
.audience-pill { border: 1px solid #cfd9de; color: var(--blue); background: none; font-size: 14px; font-weight: 700; border-radius: 9999px; padding: 1px 12px; margin-bottom: 4px; cursor: pointer; font-family: inherit; }
.audience-pill:hover { background: var(--blue-soft); }
.menu-sub { display: block; font-size: 12px; font-weight: 400; color: var(--gray); }
.poll-box { border: 1px solid var(--border); border-radius: 12px; padding: 10px; margin: 8px 0; display: flex; flex-direction: column; gap: 8px; }
.poll-box input { border: 1px solid #cfd9de; border-radius: 4px; padding: 8px 10px; font-size: 15px; font-family: inherit; outline: none; }
.poll-box input:focus { border-color: var(--blue); }
.poll-box select { font-size: 14px; font-family: inherit; }
.poll-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.img-preview { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.img-preview .imp { position: relative; }
.img-preview img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; }
.img-preview button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(0,0,0,0.6); color: #fff; cursor: pointer; font-size: 14px; }
.sched-box { margin: 8px 0; font-size: 14px; }
.sched-box input { font-family: inherit; font-size: 14px; }
.quote-chip { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; margin: 8px 0; font-size: 14px; color: var(--gray); }
.quote-chip button { border: none; background: none; font-size: 18px; cursor: pointer; color: var(--gray); }

/* Poll card + media grid + quote embed in tweets */
.poll-card { border: 1px solid var(--border); border-radius: 12px; margin-top: 10px; overflow: hidden; }
.poll-opt-row { display: block; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--border); padding: 8px 12px; cursor: pointer; font-family: inherit; font-size: 15px; color: var(--blue); position: relative; }
.poll-opt-row:last-child { border-bottom: none; }
.poll-opt-row:disabled { cursor: default; color: var(--ink); }
.poll-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue-soft); }
.poll-opt-row span { position: relative; }
.poll-meta { font-size: 13px; color: var(--gray); padding: 8px 12px; }
.media-grid { display: grid; gap: 2px; margin-top: 10px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.media-grid.n1 { grid-template-columns: 1fr; } .media-grid.n2 { grid-template-columns: 1fr 1fr; }
.media-grid.n3 { grid-template-columns: 1fr 1fr; } .media-grid.n4 { grid-template-columns: 1fr 1fr; }
.media-grid img { width: 100%; height: 100%; max-height: 280px; object-fit: cover; display: block; cursor: pointer; }
.media-grid video { width: 100%; max-height: 320px; display: block; background: #000; }
.img-preview video { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; display: block; }
.quote-embed { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-top: 10px; cursor: pointer; }
.quote-embed:hover { background: rgba(0,0,0,0.02); }
/* URL embeds: images, videos, iframes, link cards */
.url-embeds { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.url-embed { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.url-embed[data-kind="internal"] { padding: 10px 12px; }
.url-embed img { width: 100%; max-height: 320px; object-fit: cover; display: block; cursor: pointer; }
.url-embed video { width: 100%; max-height: 340px; display: block; background: #000; }
.url-embed iframe { width: 100%; aspect-ratio: 16 / 9; display: block; border: 0; background: #000; }
.url-embed[data-kind="audio"] { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.url-embed[data-kind="audio"] a { font-size: 13px; color: var(--gray); word-break: break-all; }
.link-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-decoration: none; color: inherit; }
.link-card:hover { background: rgba(0,0,0,0.02); }
.link-fav { width: 28px; height: 28px; border-radius: 6px; flex: none; }
.link-meta { display: flex; flex-direction: column; min-width: 0; }
.link-domain { font-weight: 700; font-size: 14px; }
.link-url { font-size: 13px; color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pinned-label { display: flex; align-items: center; gap: 8px; color: var(--gray); font-size: 13px; font-weight: 700; margin: 0 0 4px 28px; }
.aud-label { font-size: 13px; color: var(--gray); }

/* Fleets */
.fleets-row { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.fleets-row:empty { display: none; }
.fleet-item { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: none; cursor: pointer; font-family: inherit; color: var(--ink); font-size: 12px; max-width: 72px; }
.fleet-ring { width: 62px; height: 62px; border-radius: 50%; padding: 3px; background: linear-gradient(45deg, var(--blue), #7b61ff); }
.fleet-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #fff; display: block; }
.fleet-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 72px; }
.fleet-add .fleet-ring { background: var(--border); }
.fleet-viewer { width: 420px; max-width: 94vw; background: #15202b; color: #fff; border-radius: 16px; padding: 12px 16px 16px; }
.fleet-top { display: flex; justify-content: space-between; align-items: center; }
.fleet-top .icon-btn { color: #fff; }
.fleet-bars { display: flex; gap: 4px; margin: 8px 0; }
.fleet-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.3); }
.fleet-bars i.seen { background: #fff; }
.fleet-body { min-height: 200px; display: flex; align-items: center; justify-content: center; font-size: 20px; text-align: center; padding: 12px; word-break: break-word; }
.fleet-body img { max-width: 100%; border-radius: 12px; }
.fleet-nav { display: flex; justify-content: space-between; gap: 8px; }
.fleet-nav .btn-outline { color: #fff; border-color: #536471; background: transparent; }
.fleet-nav .btn-outline:hover { background: rgba(255,255,255,0.12); }
.fleet-composer h3 { flex: 1; margin: 0; font-size: 18px; }
.fleet-composer .modal-top { align-items: center; gap: 12px; }
.fleet-exp { font-size: 13px; color: var(--gray); margin: 4px 0 8px; }
.fleet-composer textarea { width: 100%; border: 1px solid #cfd9de; border-radius: 8px; padding: 10px 12px; font-size: 16px; font-family: inherit; outline: none; resize: none; }
.fleet-composer textarea:focus { border-color: var(--blue); }

/* Scheduled list */
.sched-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }

/* Tweet detail */
.detail-reply { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.detail-reply img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.detail-reply textarea { flex: 1; border: none; outline: none; resize: none; font-size: 18px; font-family: inherit; background: transparent; color: var(--ink); }
.big-tweet .tweet-text { font-size: 20px; line-height: 26px; }

/* Edit profile modal */
.edit-modal label { display: block; font-size: 14px; font-weight: 700; color: var(--gray); margin: 12px 0 4px; }
.edit-modal input, .edit-modal textarea { width: 100%; border: 1px solid #cfd9de; border-radius: 4px; padding: 8px 12px; font-size: 15px; font-family: inherit; outline: none; }
.edit-modal input:focus, .edit-modal textarea:focus { border-color: var(--blue); }
.edit-modal .modal-top { align-items: center; gap: 12px; }
.edit-modal .modal-top h3 { flex: 1; margin: 0; font-size: 18px; }
.edit-banner { height: 120px; background: #cfd9de url('/img/banner_default.png') center/cover; border-radius: 8px; display: flex; align-items: flex-end; justify-content: flex-end; padding: 8px; background-size: cover; }
.edit-avatar-row { display: flex; align-items: center; gap: 12px; margin-top: -24px; padding: 0 8px; }
.edit-avatar-row img { width: 72px; height: 72px; border-radius: 50%; border: 3px solid #fff; object-fit: cover; background: #cfd9de; }

/* Mute/privacy rows */
.su-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 12px 0; }
.su-check input { width: auto; margin-top: 4px; }
.mutewords-row { display: flex; gap: 8px; }
.mutewords-row .text-input { flex: 1; }
.muted-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 15px; }

/* News cards */
.news-card { display: block; padding: 10px 16px; color: var(--ink); }
.news-card:hover { background: rgba(0,0,0,0.02); text-decoration: none; }
.news-cat { font-size: 13px; color: var(--gray); }
.news-title { font-size: 15px; font-weight: 700; }
.news-count { font-size: 13px; color: var(--gray); }

/* Shortcuts */
.shortcuts-modal { max-width: 480px; }
.shortcuts-modal .modal-top { align-items: center; justify-content: space-between; }
.shortcuts-modal h3 { margin: 0; }
.shortcuts-grid { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 15px; margin-top: 8px; }
kbd { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; font-family: inherit; font-size: 13px; }

#mobileCompose { display: none; position: fixed; right: 16px; bottom: 76px; width: 56px; height: 56px; border-radius: 50%; border: none; background: var(--blue); cursor: pointer; z-index: 100; box-shadow: rgba(0,0,0,0.2) 0 4px 12px; }
#mobileCompose svg { width: 26px; height: 26px; }

/* Bottom mobile bar */
#mobilebar { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--border); z-index: 100; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
body[data-theme="dim"] #mobilebar, body[data-theme="black"] #mobilebar { background: #15202b; }
body[data-theme="black"] #mobilebar { background: #000; }
#mobilebar nav { display: flex; justify-content: space-around; }
#mobilebar button { background: none; border: none; color: var(--ink); padding: 6px 14px; cursor: pointer; }
#mobilebar button.active { color: var(--blue); }
#mobilebar svg { width: 26px; height: 26px; }

/* Splash boot screen (G badge + staged progress bar) */
#splash {
  position: fixed; inset: 0; z-index: 1000; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  transition: opacity 0.35s ease;
}
body[data-theme="dim"] #splash { background: #15202b; }
body[data-theme="black"] #splash { background: #000; }
#splash.done { opacity: 0; pointer-events: none; }
#splash.gone { display: none !important; }
.g-splash { width: 64px; height: 64px; animation: splash-pulse 1.4s ease-in-out infinite; }
@keyframes splash-pulse { 50% { opacity: 0.55; } }
.splash-bar { width: 220px; max-width: 60vw; height: 5px; border-radius: 9999px; background: var(--border); overflow: hidden; }
.splash-bar span { display: block; height: 100%; width: 4%; border-radius: 9999px; background: var(--blue); transition: width 0.3s ease; }
.splash-label { font-size: 14px; color: var(--gray); }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 1px;
}

/* Messages uses the full row: sidebar + wide column, no right rail */
body.wide-main #rightbar { display: none; }
body.wide-main #layout { width: 1265px; max-width: 100%; }

/* Responsive */
@media (max-width: 1100px) {
  #rightbar { display: none; }
  #layout, body.wide-main #layout { width: 100%; max-width: 700px; }
  #sidebar { width: 88px; align-items: center; padding: 4px 6px; }
  .snav-label, .side-account-names, .side-account-dots { display: none; }
  .side-nav-item { padding: 10px 12px; }
  .tweet-btn-big { width: 52px; height: 52px; padding: 0; font-size: 0; border-radius: 50%; margin: 12px auto; }
  .tweet-btn-big::after { content: "+"; font-size: 30px; font-weight: 400; }
  #maincol, body.wide-main #maincol { width: auto; flex: 1; min-width: 0; }
  #sidebarAccount { justify-content: center; }
}
@media (max-width: 700px) {
  #mobilebar { display: block; }
  #mobileCompose { display: block; }
  body { padding-bottom: 60px; }
  #sidebar { display: none; }
  #layout, body.wide-main #layout { width: 100%; max-width: 100%; }
  #maincol, body.wide-main #maincol { width: 100%; border-left: none; border-right: none; }
  .dm-layout { flex-direction: column; height: auto; }
  .dm-list { width: 100%; border-right: none; border-bottom: 1px solid var(--border); max-height: 40vh; }
  .dm-conversation { min-height: 50vh; }
  .settings-layout { flex-direction: column; }
  .settings-nav { width: 100%; border-right: none; border-bottom: 1px solid var(--border); flex-direction: row; flex-wrap: wrap; }
  .settings-nav-item { border-right: none; border-bottom: 3px solid transparent; }
  .settings-nav-item.active { border-bottom-color: var(--blue); }
  .settings-session { flex-direction: row; align-items: center; gap: 10px; margin-top: 0; width: 100%; }
  .front-split { flex-direction: column; }
  .front-blue { min-height: 220px; }
  .front-main { padding: 24px; }
  .profile-stats { flex-wrap: wrap; }
  .profile-avatar { width: 100px; height: 100px; margin-top: -50px; }
  .profile-banner { height: 140px; }
  .tabs2021 { overflow-x: auto; }
  .tab2021 { white-space: nowrap; }
  .explore-search, .right-search { min-width: 0; }
  .modal-tweet { margin: 0 8px; }
}
