[hidden] { display: none !important; }

.book-view { min-height: 100vh; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow-x: clip; }
.ui-switch { display: flex; flex-shrink: 0; margin-left: auto; gap: 3px; padding: 4px; background: #f5f5f3; border: 1px solid #e7e7e4; border-radius: 30px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.ui-switch button { display: flex; align-items: center; gap: 7px; padding: 7px 12px; border: 0; border-radius: 24px; background: transparent; color: #6b6b68; font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; cursor: pointer; transition: background .15s, box-shadow .15s; }
.ui-switch button[aria-pressed="true"] { background: white; color: #0f1419; box-shadow: 0 1px 4px #00000015; }
.ui-switch button:hover { background: #fff9; }
.ui-switch button[aria-pressed="true"]:hover { background: white; }
.ui-switch button:focus-visible { outline: 2px solid #1d9bf0; outline-offset: 2px; }
.toolbar-reveal { display: none; }

body[data-ui="twitter"] { display: block; color: #0f1419; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
body[data-ui="twitter"]::before { display: none; }
.twitter-layout { --muted: #536471; --line: #eff3f4; --blue: #1d9bf0; display: grid; grid-template-columns: 230px minmax(0, 600px) 230px; max-width: 1060px; margin: 0 auto; min-height: 100dvh; font-size: 15px; line-height: 1.4; }
.twitter-layout button, .writing-dialog button { font: inherit; cursor: pointer; }
.twitter-layout button { -webkit-tap-highlight-color: transparent; }
.twitter-layout svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.twitter-layout button:focus-visible, .writing-dialog :focus-visible { outline: 2px solid #1d9bf0; outline-offset: 3px; }
.twitter-sidebar { height: 100dvh; position: sticky; top: 0; padding: 12px 20px 16px 8px; display: flex; flex-direction: column; align-items: flex-start; }
.twitter-nav { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.nav-item { border: 0; background: none; color: #0f1419; display: flex; align-items: center; gap: 18px; padding: 12px 18px 12px 14px; border-radius: 40px; }
.twitter-layout .nav-item { font-size: 20px; }
.nav-item:hover, .sidebar-account:hover { background: #0f14190a; }
.nav-item[aria-current="page"] { font-weight: 750; }
.nav-item[aria-current="page"] svg { stroke-width: 2.5; }
.nav-item[data-view="home"][aria-current="page"] svg { fill: currentColor; }
.post-button { display: inline-flex; justify-content: center; align-items: center; border: 1px solid transparent; background: #0f1419; color: white; padding: 9px 20px; min-height: 38px; border-radius: 30px; font-weight: 700 !important; white-space: nowrap; }
.post-button:hover:not(:disabled) { background: #272c30; }
.post-button:disabled { opacity: .45; cursor: default; }
.twitter-layout .sidebar-post { width: 100%; min-height: 50px; margin-top: 20px; font-size: 17px; box-shadow: 0 2px 4px #0000000c; }
.sidebar-post svg { display: none; }
.sidebar-account { margin-top: auto; width: 100%; border: 0; background: none; border-radius: 40px; display: flex; gap: 10px; align-items: center; padding: 12px 8px; text-align: left; }
.avatar { display: inline-flex; flex: 0 0 40px; width: 40px; height: 40px; justify-content: center; align-items: center; background: #e9e3d8; border-radius: 50%; color: #645a4b; font-size: 18px; font-weight: 650; overflow: hidden; }
.account-label { display: flex; flex-direction: column; min-width: 0; }
.account-label strong, .account-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-label span { color: var(--muted); font-size: 14px; }
.account-more { margin-left: auto; font-weight: 800; font-size: 20px; }
.twitter-main { display: flex; flex-direction: column; border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-width: 0; min-height: 100dvh; }
.twitter-header { position: sticky; top: 0; background: #ffffffed; backdrop-filter: blur(12px); min-height: 56px; padding: 15px 16px; z-index: 5; border-bottom: 1px solid var(--line); }
.twitter-header h1 { font-size: 20px; line-height: 1.3; font-weight: 750; }
.timeline-heading { height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 650; }
.timeline-heading > span:first-child { position: relative; display: flex; align-items: center; height: 100%; }
.timeline-heading > span:first-child::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: var(--blue); border-radius: 4px; }
.composer { display: flex; gap: 12px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.composer-content { min-width: 0; flex: 1; }
.tweet-editor { font-size: 20px; min-height: 110px; padding: 9px 0 16px; outline: none; cursor: text; }
.tweet-editor[data-empty="true"]::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.rich-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.rich-text p, .rich-text div { margin: 0; }
.rich-text a { color: #087cce; text-decoration: underline; text-underline-offset: 2px; }
.rich-text ul, .rich-text ol { padding-left: 1.5em; }
.rich-text blockquote { border-left: 3px solid #b8dff8; margin: 6px 0; padding: 2px 0 2px 12px; color: #536471; }
.rich-text pre { white-space: pre-wrap; }
.rich-text code, .rich-text pre { background: #f7f9f9; font-family: ui-monospace, monospace; font-size: .9em; }
.composer-bottom { padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 4px; align-items: center; justify-content: space-between; }
.formatting-toolbar { display: flex; align-items: center; margin-left: -6px; }
.formatting-toolbar button { border: 0; background: transparent; border-radius: 50%; color: #087cce; width: 30px; height: 32px; display: inline-flex; justify-content: center; align-items: center; font-size: 16px; }
.formatting-toolbar button:hover, .formatting-toolbar button[aria-pressed="true"] { background: #e8f5fd; }
.formatting-toolbar svg { width: 17px; height: 17px; }
.composer-submit { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.word-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.editing-label { color: #087cce; font-size: 13px; }
.editing-label button { float: right; color: var(--muted); border: 0; background: none; text-decoration: underline; }
.empty-state { max-width: 370px; margin: 0 auto; padding: 48px 16px; }
.empty-state h2 { font-size: 30px; line-height: 1.15; letter-spacing: -.8px; font-weight: 800; margin-bottom: 12px; }
.empty-state p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.empty-state .post-button { margin-top: 22px; }
.tweet { display: flex; gap: 12px; padding: 16px 16px 10px; border-bottom: 1px solid var(--line); }
.tweet-content { min-width: 0; flex: 1; }
.tweet-meta { display: flex; align-items: baseline; gap: 5px; font-size: 15px; min-height: 25px; }
.tweet-author { flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.tweet-handle { color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tweet-time { color: var(--muted); white-space: nowrap; font-size: 14px; }
.tweet-time::before { content: '·'; margin-right: 5px; }
.tweet-menu { margin-left: auto; position: relative; align-self: flex-start; flex-shrink: 0; }
.tweet-menu summary { list-style: none; cursor: pointer; padding: 0 6px; font-weight: 700; color: var(--muted); line-height: 22px; border-radius: 20px; letter-spacing: 2px; }
.tweet-menu summary::-webkit-details-marker { display: none; }
.tweet-menu summary:hover { color: var(--blue); background: #e8f5fd; }
.tweet-menu-items { position: absolute; right: 0; top: 26px; z-index: 6; min-width: 145px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 2px 16px #0002; }
.tweet-menu-items button { display: block; text-align: left; width: 100%; padding: 10px; border: 0; background: transparent; font-size: 14px; border-radius: 8px; white-space: nowrap; }
.tweet-menu-items button:hover { background: #f7f9f9; }
.tweet-menu-items button[data-action="delete"] { color: #b42336; }
.tweet-body { font-size: 15px; }
.tweet-actions { display: flex; align-items: center; gap: 30px; margin-top: 12px; color: var(--muted); }
.tweet-action { border: 0; background: none; color: inherit; padding: 5px; margin-left: -5px; display: flex; align-items: center; gap: 7px; border-radius: 18px; font-size: 12px !important; }
.tweet-action svg { width: 18px; height: 18px; }
.tweet-action:hover { color: #087cce; background: #e8f5fd; }
.tweet-action[data-action="like"]:hover, .tweet-action[aria-pressed="true"] { color: #e33a7b; background: #fff2f7; }
.tweet-action[aria-pressed="true"] svg { fill: currentColor; }
.tweet-length { margin-left: auto; font-size: 12px; }
.profile-cover { height: 170px; background: #eff3f4; display: flex; justify-content: flex-end; align-items: center; padding-right: 38px; }
.profile-cover img { filter: grayscale(1); opacity: .15; }
.profile-details { padding: 0 16px 18px; }
.profile-top { display: flex; align-items: flex-start; justify-content: space-between; min-height: 74px; }
.profile-avatar { width: 126px; height: 126px; flex-basis: 126px; margin-top: -65px; border: 4px solid white; font-size: 46px; }
.outline-button { display: inline-flex; justify-content: center; align-items: center; min-height: 36px; padding: 8px 16px; border: 1px solid #cfd9de; border-radius: 25px; background: white; color: #0f1419; font-weight: 650 !important; }
.outline-button:hover { background: #f7f9f9; }
.profile-top .outline-button { margin-top: 12px; }
.profile-details h2 { font-size: 20px; font-weight: 800; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.profile-bio { margin-top: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-note { font-size: 13px; color: var(--muted); margin-top: 12px; }
.profile-tabs { border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 0 20px; height: 50px; align-items: center; font-size: 14px; }
.profile-tabs > span:first-child { position: relative; height: 100%; display: flex; align-items: center; font-weight: 700; }
.profile-tabs > span:first-child::after { content: ''; position: absolute; bottom: 0; width: 100%; height: 4px; border-radius: 4px; background: var(--blue); }
.settings-panel { padding: 24px 20px; }
.settings-panel h2 { font-size: 21px; margin-bottom: 24px; }
.setting-row { display: flex; position: relative; align-items: flex-start; gap: 24px; cursor: pointer; }
.setting-row > span:first-child { flex: 1; }
.setting-row strong { display: block; font-size: 16px; margin-bottom: 5px; }
.setting-row > span > span { color: var(--muted); font-size: 14px; line-height: 1.55; }
.switch-input { position: absolute; right: 0; top: 0; width: 44px; height: 26px; opacity: 0; cursor: pointer; }
.switch-track { flex-shrink: 0; width: 44px; height: 26px; background: #b8c3cb; border-radius: 20px; padding: 3px; pointer-events: none; }
.switch-track::after { content: ''; display: block; width: 20px; height: 20px; border-radius: 50%; background: white; box-shadow: 0 1px 3px #0002; transition: transform .15s; }
.switch-input:checked + .switch-track { background: var(--blue); }
.switch-input:checked + .switch-track::after { transform: translateX(18px); }
.switch-input:focus-visible + .switch-track { outline: 2px solid #0f1419; outline-offset: 3px; }
.settings-note { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 25px; }
.settings-note h3 { font-size: 16px; margin-bottom: 8px; }
.settings-note p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.settings-note .outline-button { margin-top: 20px; font-size: 14px; }
.twitter-credit { margin-top: auto; border-top: 1px solid var(--line); padding: 20px 16px; text-align: center; font-size: 12px; line-height: 1.8; color: #727e87; }
.twitter-credit a { color: inherit; text-decoration: none; }
.twitter-credit a:hover { text-decoration: underline; }
.writing-dialog { position: fixed; margin: auto; max-width: 430px; width: calc(100% - 32px); max-height: calc(100dvh - 32px); padding: 28px; border: 0; border-radius: 20px; color: #0f1419; background: white; box-shadow: 0 10px 60px #0002; font: 15px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.writing-dialog::backdrop { background: #53647166; }
.writing-dialog h2 { font-size: 24px; line-height: 1.2; margin-bottom: 20px; }
.writing-dialog label { display: block; margin: 14px 0 6px; color: #536471; font-size: 14px; }
.writing-dialog input, .writing-dialog textarea { width: 100%; border: 1px solid #cfd9de; padding: 11px; border-radius: 6px; font: inherit; background: white; color: #0f1419; }
.writing-dialog textarea { resize: vertical; }
.writing-dialog p { color: #536471; font-size: 14px; margin-top: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.handle-input { position: relative; }
.handle-input > span { position: absolute; top: 11px; left: 11px; color: #536471; }
.handle-input input { padding-left: 29px; }
.danger-button { background: #e0243b; }
.danger-button:hover { background: #bf1830 !important; }
.writing-status { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 3000; max-width: min(520px, calc(100% - 32px)); padding: 13px 22px; border-radius: 12px; background: #0f1419; color: white; box-shadow: 0 4px 20px #0002; font: 14px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.writing-status[data-error="true"] { background: #a51d31; }

@media (max-width: 1060px) {
    .twitter-layout { grid-template-columns: 88px minmax(0, 600px) 88px; max-width: 776px; }
    .twitter-sidebar { padding: 12px 16px; align-items: center; }
    .nav-item { padding: 14px; }
    .nav-item span, .sidebar-post span, .account-label, .account-more { display: none; }
    .sidebar-post svg { display: block; }
    .twitter-layout .sidebar-post { width: 52px; height: 52px; padding: 12px; }
    .sidebar-account { justify-content: center; padding: 10px 0; }
}
@media (max-width: 1000px) {
    .toolbar { flex-wrap: wrap; }
    .toolbar-content { order: 2; flex-basis: 100%; overflow-x: auto; justify-content: flex-start; }
}
@media (max-width: 600px) {
    .toolbar { padding: 12px; }
    .ui-switch button { padding: 6px 9px; gap: 5px; font-size: 12px; }
    .ui-switch img { width: 20px; height: 20px; }
    .twitter-layout { display: block; padding-bottom: 76px; }
    .twitter-main { border: 0; min-height: calc(100dvh - 76px); }
    .twitter-sidebar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; padding: 8px 16px max(8px, env(safe-area-inset-bottom)); z-index: 20; border-top: 1px solid var(--line); background: #fffffff5; backdrop-filter: blur(12px); flex-direction: row; }
    .sidebar-account { display: none; }
    .twitter-nav { width: 100%; flex-direction: row; justify-content: space-around; gap: 0; }
    .nav-item { padding: 10px 16px; }
    .twitter-layout .sidebar-post { flex-shrink: 0; margin: 0 0 0 8px; width: 43px; height: 43px; min-height: 43px; }
    .composer { padding: 16px 12px 12px; gap: 10px; }
    .composer-avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: 16px; }
    .tweet-editor { font-size: 19px; min-height: 112px; padding-top: 5px; }
    .formatting-toolbar button { width: 29px; }
    .empty-state { padding: 40px 28px; }
    .empty-state h2 { font-size: 28px; }
    .tweet { padding: 14px 12px 10px; gap: 10px; }
    .tweet-handle { max-width: 95px; }
    .profile-cover { height: 145px; }
    .profile-avatar { width: 106px; height: 106px; flex-basis: 106px; margin-top: -55px; font-size: 40px; }
    .profile-top { min-height: 65px; }
    .writing-status { bottom: 86px; width: max-content; }
    .toolbar-content { gap: 8px; padding: 0; }
    .book-view .book-page { padding: 85px 24px 65px; }
}
@media (hover: none) {
    .toolbar::before { display: none; }
    .toolbar-reveal { display: flex; position: absolute; top: 100%; right: 16px; width: 48px; height: 24px; align-items: center; justify-content: center; border: 1px solid #e7e7e4; border-top: 0; border-radius: 0 0 10px 10px; background: white; cursor: pointer; }
    .toolbar-reveal span { width: 20px; height: 3px; border-radius: 3px; background: #a7adaf; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
    .particle-container { display: none; }
}
