/* Платформа 2breath (MVC) — поверх breath.css */
body { min-height: 100vh; }

.pf-top {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 28px; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.pf-top .logo img { height: 28px; }
.pf-top .spacer { flex: 1; }
.pf-top .me { color: var(--text-2); font-size: 14px; }
.pf-top .badge { background: var(--brand-soft); color: var(--accent); border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; margin-left: 8px; }
.pf-top nav a { color: var(--text-2); font-size: 14.5px; margin-right: 4px; }
.pf-top nav a:hover { color: var(--text); }

.pf-wrap { max-width: 620px; margin: 0 auto; padding: 24px 16px 80px; }

.composer { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 18px; margin-bottom: 22px; }
.composer textarea { width: 100%; border: none; resize: vertical; min-height: 64px; background: transparent; color: var(--text); font-size: 16px; font-family: inherit; outline: none; }
.composer .row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.composer .row .spacer { flex: 1; }
.composer label { color: var(--text-2); font-size: 14px; display: flex; gap: 6px; align-items: center; }

.post { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 18px; margin-bottom: 14px; }
.post .head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.post .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-grad); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; }
.post .author { font-weight: 600; color: var(--text); text-decoration: none; }
a.author:hover { color: var(--accent); }

/* авторизация: разделитель, кнопка Яндекса, переключатель вход/регистрация */
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; margin: 4px 0; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn-yandex { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
    padding: 11px 16px; border-radius: var(--r-lg); background: #fff; color: #1a1a1a; font-weight: 600;
    text-decoration: none; border: 1.5px solid var(--border); transition: border-color .15s, transform .12s var(--ease); }
.btn-yandex:hover { border-color: #FC3F1D; transform: translateY(-1px); }
.btn-yandex.disabled { opacity: .55; }
.btn-yandex .ya-logo { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
    border-radius: 50%; background: #FC3F1D; color: #fff; font-weight: 800; font-size: 14px; }
.welcome-banner { background: var(--brand-soft); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 14px 18px; margin-bottom: 18px; color: var(--text); font-size: 15px; line-height: 1.5; }
.field-hint { font-size: 12.5px; margin: 5px 2px 0; min-height: 16px; color: var(--text-2); }
.field-hint.ok { color: #5E8A5E; }
.field-hint.bad { color: #C97064; }
.auth-switch { margin-top: 16px; font-size: 14px; color: var(--text-2); text-align: center; }
.auth-switch a { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* аватар-фото */
.avatar.photo { padding: 0; overflow: hidden; background: var(--bg-tint) !important; }
.avatar.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* редактирование профиля */
.pf-edit { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.pf-edit .fld { display: flex; flex-direction: column; gap: 6px; }
.pf-edit .fld > span { font-size: 13px; color: var(--text-2); font-weight: 600; }
.pf-edit-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pf-edit-avatar { display: flex; align-items: center; gap: 18px; }
.pf-edit-avatar .avatar { flex: none; }
.pf-edit-avatar-ctl { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.pf-edit-avatar-ctl label.btn { cursor: pointer; }
.mood-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.mood-opt { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px;
    border: 1.5px solid var(--border); cursor: pointer; font-size: 14px; color: var(--text-2); transition: border-color .15s; }
.mood-opt:hover { border-color: var(--mc); }
.mood-opt.active { border-color: var(--mc); background: color-mix(in srgb, var(--mc) 16%, transparent); color: var(--text); font-weight: 600; }
.mood-opt .mood-emoji { font-size: 17px; }
@media (max-width: 560px) { .pf-edit-row { grid-template-columns: 1fr; } }

/* маски: аватар с маской вместо инициала */
.avatar.masked { background: var(--bg-tint) !important; padding: 0; overflow: hidden; }
.avatar.masked svg { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.avatar.masked.lg { width: 64px; height: 64px; }
.mask-current { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.mask-current .avatar { width: 64px; height: 64px; flex: none; }
.mask-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 12px; }
.mask-cell { margin: 0; }
.mask-cell button { width: 100%; aspect-ratio: 1; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-lg); cursor: pointer; padding: 10px; transition: border-color .15s, transform .12s var(--ease); }
.mask-cell button:hover { border-color: var(--accent); transform: translateY(-3px); }
.mask-cell.active button { border-color: var(--accent); background: var(--brand-soft); }
.mask-cell svg { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.post .time { color: var(--text-3); font-size: 12px; margin-left: auto; }
.post .body { color: var(--text); line-height: 1.55; white-space: pre-wrap; }
.post .actions { display: flex; gap: 8px; margin-top: 12px; }

.react { border: 1px solid var(--border-2); background: transparent; color: var(--text-2); border-radius: 999px; padding: 6px 13px; font-size: 14px; cursor: pointer; transition: all .2s; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.react:hover { border-color: var(--accent); color: var(--accent); }
.react.active { background: var(--brand-soft); color: var(--accent); border-color: transparent; }

.btn { background: var(--brand-grad); color: #fff; border: none; border-radius: var(--r-md); padding: 11px 20px; font-weight: 600; cursor: pointer; box-shadow: var(--glow); text-decoration: none; display: inline-block; }
.btn:disabled { opacity: .5; cursor: default; box-shadow: none; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.field { width: 100%; padding: 13px 15px; border: 1px solid var(--border-2); border-radius: var(--r-md); background: var(--surface); color: var(--text); font-size: 16px; outline: none; }
.field:focus { border-color: var(--accent); }
.muted { color: var(--text-2); }
.error { color: #c0564a; font-size: 14px; }
.htmx-request { opacity: .6; }

/* nav слева в шапке */
.pf-nav-left { margin-right: auto; display: flex; gap: 16px; } .pf-nav-left a { color: var(--text-2); font-size: 14.5px; } .pf-nav-left a:hover { color: var(--text); }

/* комнаты */
.room-search { display: flex; gap: 8px; margin-bottom: 14px; }
.room-search .field { flex: 1; }
.room-create { margin-bottom: 20px; }
.room-create summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14.5px; list-style: none; }
.room-create summary::-webkit-details-marker { display: none; }
.room-create form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.room-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 560px) { .room-grid { grid-template-columns: 1fr; } }
.room-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 16px; text-decoration: none; transition: border-color .2s, transform .12s var(--ease); }
.room-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.room-ava { width: 44px; height: 44px; flex: none; border-radius: var(--r-md); background: var(--brand-grad); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 18px; }
.room-ava.lg { width: 60px; height: 60px; font-size: 24px; }
.room-card .room-body h3 { font-size: 17px; color: var(--text); margin: 0 0 2px; }
.room-members { font-size: 13px; }
.room-header { display: flex; gap: 16px; align-items: flex-start; margin: 14px 0 22px; }
.room-meta { flex: 1; } .room-meta h1 { font-size: 26px; margin-bottom: 4px; } .room-meta p { margin-top: 10px; color: var(--text-2); }
.room-actions { flex: none; }

/* личные: запросы и диалоги */
.requests { margin-bottom: 22px; }
.request { display: flex; align-items: center; gap: 14px; background: var(--brand-soft); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; margin-bottom: 10px; }
.request .req-body { flex: 1; } .req-actions { display: flex; gap: 8px; flex: none; }
.conv-row { display: block; text-decoration: none; }
.msg { padding: 9px 0; } .msg-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 3px; }
.msg-body { color: var(--text); font-size: 15px; line-height: 1.5; white-space: pre-wrap; }
.msg-knock summary { display: inline-block; cursor: pointer; list-style: none; }
.msg-knock summary::-webkit-details-marker { display: none; }
.msg-knock[open] summary { display: none; }
.profile-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

/* колокольчик уведомлений */
.nav-bell { position: relative; font-size: 18px; text-decoration: none; }
.bell-count { position: absolute; top: -6px; right: -10px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; display: inline-grid; place-items: center; }
.notif.unread { border-left: 3px solid var(--accent); }

/* комнаты: видимость, замок */
.room-vis { display: flex; flex-direction: column; gap: 6px; margin: 4px 0; }
.room-vis label { color: var(--text-2); font-size: 14px; display: flex; gap: 7px; align-items: center; }
.lock { font-size: .8em; }
.room-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.room-tabs .tab { padding: 7px 14px; border-radius: 999px; font-size: 14px; text-decoration: none; color: var(--text-2); border: 1px solid var(--border); }
.room-tabs .tab.active { background: var(--brand-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.room-tabs a.tab:hover { border-color: var(--accent); color: var(--accent); }

/* блог: карточки в ленте и списке */
.blog-card .blog-title { text-decoration: none; }
.blog-card .blog-title h3 { font-size: 19px; color: var(--text); margin: 0 0 4px; line-height: 1.25; }
.blog-card:hover .blog-title h3 { color: var(--accent); }
.blog-card .blog-excerpt { color: var(--text-2); font-size: 15px; line-height: 1.5; margin: 8px 0 10px; }
.blog-meta { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.blog-meta a { color: var(--accent); }
.kind-tag { background: var(--brand-soft); color: var(--accent); border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 600; }
.kind-tag.pub { color: #5a8a5a; }
.read-more { color: var(--accent); font-size: 14px; font-weight: 600; text-decoration: none; }
.read-more:hover { text-decoration: underline; }
.link-danger { background: none; border: none; color: #c0564a; cursor: pointer; font-size: 13px; padding: 0; }

/* блог: страница записи */
.blog-detail { margin-top: 14px; }
.blog-detail h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.15; margin-bottom: 10px; }
.blog-detail .blog-meta { margin-bottom: 22px; }
.blog-cover { width: 100%; border-radius: var(--r-lg); margin-bottom: 22px; }
.blog-body { color: var(--text); font-size: 17px; line-height: 1.7; }
.blog-body h1, .blog-body h2, .blog-body h3 { line-height: 1.25; margin: 26px 0 10px; }
.blog-body h2 { font-size: 24px; } .blog-body h3 { font-size: 20px; }
.blog-body p { margin: 0 0 16px; } .blog-body ul, .blog-body ol { margin: 0 0 16px 22px; }
.blog-body li { margin-bottom: 6px; } .blog-body a { color: var(--accent); }
.blog-body blockquote { border-left: 3px solid var(--border-2); padding-left: 16px; color: var(--text-2); margin: 0 0 16px; }
.blog-body code { font-family: var(--mono); background: var(--bg-tint); padding: 1px 5px; border-radius: 3px; font-size: .9em; }
.blog-body pre { background: var(--bg-tint); padding: 14px; border-radius: var(--r-md); overflow-x: auto; margin: 0 0 16px; }

/* блог: редактор */
.blog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.blog-head h1 { font-size: 24px; }
.editor-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.editor-split textarea { width: 100%; resize: vertical; }
.preview-pane { min-height: 300px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; overflow-y: auto; max-height: 420px; }
.editor-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
@media (max-width: 640px) { .editor-split { grid-template-columns: 1fr; } }

/* комментарии под постом */
.comments-slot:empty { display: none; }
.comments { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.comment-form { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.comment-input { flex: 1; padding: 9px 13px; font-size: 14.5px; }
.comment-anon { color: var(--text-3); font-size: 12px; display: flex; gap: 4px; align-items: center; white-space: nowrap; }
.comment-empty { font-size: 14px; margin: 6px 0; }
.comment { padding: 9px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.comment-author { font-weight: 600; font-size: 14px; }
.comment-time { color: var(--text-3); font-size: 12px; }
.comment-body { color: var(--text); font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; }

.login { max-width: 380px; margin: 9vh auto; text-align: center; }
.login .orb { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-grad); box-shadow: var(--glow); margin: 0 auto 22px; }
.login h1 { font-size: 28px; margin-bottom: 6px; }
.login .stack { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; text-align: left; }

/* автодополнение города (используется в /profile/edit; стили самой админки — assets/admin.css) */
.city-field { position: relative; }
.city-suggest { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow); z-index: 20; max-height: 220px; overflow-y: auto; display: none; }
.city-suggest.show { display: block; }
.city-suggest div { padding: 9px 14px; cursor: pointer; font-size: 14.5px; }
.city-suggest div:hover, .city-suggest div.active { background: var(--brand-soft); }
