:root { color-scheme: light; --bg: #fff; --fg: #0f1f3d; --muted: #5d6b85; --accent: #1664e8; --border: #dde5f2; --page: #eef3fb; }
body { background: var(--page); }
.main { padding-top: 1rem; max-width: 40rem !important; padding-bottom: 6rem; }
.card { box-shadow: 0 1px 3px rgba(20, 60, 140, 0.08); border-radius: 14px; }
h2 { margin: 0; color: var(--fg); }
.muted { color: var(--muted); } .small { font-size: .9rem; margin: 0; } .center { justify-content: center; text-align: center; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-ghost { background: #e8f0fe; color: var(--accent); }
.btn-danger { background: #d92d20; }
.btn-big { justify-content: center; padding: .8rem; font-size: 1.05rem; }
.btn-icon { border: 0; background: none; cursor: pointer; font-size: 1.1rem; padding: .3rem .5rem; border-radius: 8px; color: var(--muted); }
.btn-icon:hover { background: #eef3fb; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.form-error { color: #b42318; margin: 0; font-size: .9rem; }
.avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-flex; }
.avatar-letter { align-items: center; justify-content: center; background: linear-gradient(135deg, #1664e8, #4fa3ff); color: #fff; font-weight: 700; }
.topbar { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid var(--border); display: flex;
	align-items: center; justify-content: space-between; padding: .4rem 1rem; gap: .5rem; }
.logo { font-weight: 800; font-size: 1.3rem; color: var(--accent); background: none; border: 0; cursor: pointer; letter-spacing: -.02em; font-family: inherit; }
.logo span { color: #0f1f3d; }
.logo.big { font-size: 2.6rem; }
.topnav { display: flex; gap: .25rem; }
.nav { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; cursor: pointer;
	padding: .35rem .7rem; border-radius: 10px; color: var(--muted); font: inherit; font-size: 1.2rem; }
.nav em { font-style: normal; font-size: .7rem; }
.nav.on { color: var(--accent); background: #e8f0fe; }
.dot { position: absolute; top: 0; right: 6px; background: #e0245e; color: #fff; font-size: .65rem; border-radius: 99px; padding: 0 5px; }
@media (max-width: 40rem) {
	.topbar { justify-content: center; }
	.topnav { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--border); justify-content: space-around;
		padding: .3rem 0 calc(.3rem + env(safe-area-inset-bottom)); }
}
.composer-top { display: flex; gap: .7rem; }
.composer-top .textarea { border-radius: 20px; background: #f2f5fb; border: 0; resize: vertical; }
.composer-bar { display: flex; justify-content: space-between; margin-top: .7rem; border-top: 1px solid var(--border); padding-top: .7rem; }
.preview-img { position: relative; margin-top: .7rem; }
.preview-img img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 10px; }
.preview-img .btn-icon { position: absolute; top: 6px; right: 6px; background: #fff; }
.post { padding: 0; overflow: hidden; }
.post-head { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem 0; }
.link-user { display: flex; gap: .6rem; align-items: center; background: none; border: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; padding: 0; }
.link-user small, .person small { display: block; color: var(--muted); font-size: .8rem; }
.post-body { padding: 0 1rem; white-space: pre-wrap; word-break: break-word; }
.post-img { width: 100%; max-height: 520px; object-fit: cover; display: block; }
.post-stats { display: flex; justify-content: space-between; padding: .5rem 1rem; color: var(--muted); font-size: .9rem; }
.post-stats .link { color: var(--muted); }
.post-actions { display: flex; border-top: 1px solid var(--border); margin: 0 1rem; }
.act { flex: 1; background: none; border: 0; padding: .6rem; cursor: pointer; font: inherit; color: var(--muted); font-weight: 600; border-radius: 8px; }
.act:hover { background: #f2f5fb; } .act.active { color: var(--accent); }
.post > .form-error { padding: 0 1rem .5rem; }
.comments { padding: .5rem 1rem 1rem; display: grid; gap: .5rem; }
.comment { display: flex; gap: .5rem; }
.bubble { background: #f2f5fb; border-radius: 14px; padding: .4rem .8rem; min-width: 0; }
.bubble p { margin: 0; word-break: break-word; } .bubble strong { font-size: .85rem; }
.comment-form { display: flex; gap: .5rem; }
.comment-form .input { border-radius: 99px; }
.profile { padding: 0; overflow: hidden; }
.cover { height: 130px; background: linear-gradient(120deg, #0c4ad1, #4fa3ff 60%, #bfe0ff); }
.profile-main { display: grid; justify-items: center; gap: .5rem; margin-top: -48px; padding: 0 1rem 1.2rem; text-align: center; }
.profile-main .avatar { border: 4px solid #fff; }
.profile-main h1 { margin: 0; }
.bio { margin: 0; color: var(--muted); max-width: 30rem; }
.edit { padding: 1rem; border-top: 1px solid var(--border); }
.person { display: flex; gap: .8rem; align-items: center; text-align: left; cursor: pointer; font: inherit; color: inherit; width: 100%; }
.person:hover { border-color: var(--accent); } .unseen { background: #eaf2ff; }
.input.big { padding: .8rem 1rem; border-radius: 99px; }
.chat { display: flex; flex-direction: column; height: calc(100vh - 11rem); min-height: 360px; gap: .6rem; }
.chat-head { display: flex; align-items: center; gap: .5rem; border-bottom: 1px solid var(--border); padding-bottom: .5rem; }
.chat-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: .35rem; }
.msg { align-self: flex-start; background: #f0f3f9; padding: .45rem .8rem; border-radius: 16px; max-width: 80%; word-break: break-word; }
.msg.mine { align-self: flex-end; background: var(--accent); color: #fff; }
.landing { padding-top: 1rem; }
.hero { text-align: center; margin-bottom: 1.5rem; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 34rem; margin: .5rem auto 0; }
.landing-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 52rem) { .landing-grid { grid-template-columns: 24rem minmax(0, 1fr); align-items: start; } .auth { position: sticky; top: 1rem; } }
.auth .field { margin: 0; }
.narrow { max-width: 26rem; margin: 0 auto; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .5rem .9rem; }
.tabs { display: flex; gap: .4rem; }
.tab { border: 1px solid var(--border); background: #fff; border-radius: 99px; padding: .4rem 1rem; cursor: pointer; font: inherit; }
.tab.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.admin-row { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.admin-row p { margin: .2rem 0 0; word-break: break-word; }
.grow { flex: 1; min-width: 10rem; }
.thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.foot { margin-top: 2rem; gap: 1.5rem; }
