:root {
    --ink: #242a33;
    --muted: #6b7785;
    --line: #e4ebf0;
    --paper: #eef2f5;
    --card: #fff;
    --blue: #1aa3df;
    --blue-deep: #0d86bf;
    --blue-soft: #e7f6fd;
    --shadow: 0 12px 32px rgba(22, 45, 68, 0.08);
}

body {
    font-family: "Segoe UI", sans-serif;
    color: var(--ink);
    background: #fff;
}

a { color: var(--blue-deep); }
a:hover { color: #086f9e; }

.skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    background: #fff;
    padding: .4rem .7rem;
    z-index: 20;
}
.skip-link:focus { top: .5rem; }

.mark {
    width: 2rem;
    height: 2rem;
    border-radius: .55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--blue);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    flex: none;
}

.btn-enter,
.btn-brand {
    background: var(--blue);
    border: 0;
    color: #fff;
    font-weight: 650;
    border-radius: 999px;
    padding: .55rem 1.15rem;
}
.btn-enter:hover,
.btn-brand:hover,
.btn-enter:focus,
.btn-brand:focus {
    background: var(--blue-deep);
    color: #fff;
}
.btn-enter-lg { padding: .8rem 1.4rem; font-size: 1.05rem; }
.btn-ghost {
    border: 1px solid #c9d6e0;
    background: #fff;
    color: var(--ink);
    border-radius: 999px;
    padding: .45rem 1rem;
    text-decoration: none;
    font-weight: 600;
}
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn-accent {
    background: #fff;
    border: 1px solid #b9d7e8;
    color: var(--blue-deep);
    font-weight: 600;
    border-radius: 999px;
}
.btn-accent:hover { background: var(--blue-soft); color: var(--blue-deep); }
.btn-side {
    width: 100%;
    margin-top: .7rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    font-weight: 600;
}
.btn-side:hover { background: var(--paper); }

.site-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-wide {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}
.site-bar .site-wide,
.site-foot .site-wide {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 72px;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--ink);
    text-decoration: none;
    font-weight: 750;
    font-weight: 700;
    font-size: 1.15rem;
}
.site-nav { display: flex; gap: 1.1rem; margin-right: auto; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-nav a:hover { color: var(--blue-deep); }

.hero { padding: 4.2rem 0 3rem; }
.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 3rem;
    align-items: center;
}
.eyebrow {
    color: var(--blue-deep);
    font-weight: 700;
    margin-bottom: .6rem;
}
.hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.1rem);
    line-height: 1.05;
    letter-spacing: -.035em;
    font-weight: 750;
    font-weight: 700;
    margin: 0 0 1rem;
}
.hero-lead {
    font-size: 1.2rem;
    color: #46515c;
    max-width: 38rem;
}
.hero-actions { margin-top: 1.5rem; }
.hero-card { }
.mock {
    display: grid;
    grid-template-columns: 72px 1fr;
    min-height: 280px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.mock-side {
    background: #f7fafc;
    border-right: 1px solid var(--line);
    padding: .8rem .55rem;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}
.mock-side b {
    width: 2rem;
    height: 2rem;
    border-radius: .5rem;
    background: var(--blue);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: .7rem;
}
.mock-side span {
    height: .55rem;
    border-radius: 99px;
    background: #d5e2ea;
}
.mock-side span.on { background: #b7e4f7; }
.mock-main { padding: 1rem; background: var(--paper); }
.mock-line {
    height: .7rem;
    width: 40%;
    border-radius: 99px;
    background: #d5e2ea;
    margin-bottom: .8rem;
}
.mock-post {
    height: 78px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: .6rem;
    border: 1px solid var(--line);
}
.mock-post.short { height: 54px; width: 86%; }
.mock-caption { color: var(--muted); margin: .7rem 0 0; font-size: .92rem; }

.band { padding: 3.2rem 0; }
.band h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    letter-spacing: -.03em;
    font-weight: 700;
    margin-bottom: 1.2rem;
}
.band-soft { background: #f6fafc; }
.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.tool {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.15rem 1.15rem 1.2rem;
    box-shadow: var(--shadow);
}
.tool h3 { font-size: 1.15rem; margin: 0 0 .4rem; }
.tool p { margin: 0; color: #4d5966; }
.look-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}
.plain { padding-left: 1.1rem; color: #3d4853; }
.plain li { margin: .35rem 0; }
.shot {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.shot-bar { display: flex; gap: .35rem; padding: .7rem .9rem; background: #f3f7fa; }
.shot-bar i { width: .55rem; height: .55rem; border-radius: 50%; background: #c5d3de; display: block; }
.shot-body { display: grid; grid-template-columns: 140px 1fr; min-height: 180px; }
.shot-body aside { border-right: 1px solid var(--line); padding: .8rem; display: flex; flex-direction: column; gap: .35rem; }
.shot-body em { font-style: normal; color: var(--muted); font-size: .92rem; }
.shot-body em.on { background: var(--blue-soft); color: var(--blue-deep); border-radius: 8px; padding: .25rem .45rem; font-weight: 700; }
.shot-body div { padding: 1rem 1.1rem; }
.shot-body small { display: block; color: var(--muted); margin-top: .35rem; }
.cta-row { margin: 1.6rem 0 0; }
.site-foot { border-top: 1px solid var(--line); color: var(--muted); }

.login-page {
    min-height: calc(100vh - 72px);
    display: grid;
    place-items: center;
    padding: 2rem 1rem 3rem;
    background:
        radial-gradient(circle at 20% 10%, #e7f6fd, transparent 28%),
        #fff;
}
.login-card {
    width: min(440px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.6rem 1.4rem 1.4rem;
    box-shadow: var(--shadow);
}
.login-card h1 { font-size: 1.7rem; letter-spacing: -.03em; margin-bottom: .3rem; }

.app { background: #16182c; margin: 0; }
.shell { display: flex; min-height: 100vh; }
.side {
    width: 232px;
    flex: none;
    background: #1c2238;
    color: #d7deee;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.side-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 1rem .9rem .55rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.02rem;
}
.side-nav { display: flex; flex-direction: column; padding: .2rem .55rem; gap: .1rem; }
.side-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .48rem .7rem;
    border-radius: 10px;
    color: #d7deee;
    text-decoration: none;
    font-weight: 600;
}
.side-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side-link.is-active { background: rgba(255, 255, 255, .16); color: #fff; }
.ico { width: 1.15rem; height: 1.15rem; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-foot { margin-top: auto; padding-bottom: .4rem; }
.side-foot .side-link { margin: 0 .55rem .2rem; }
.side-user { padding: .75rem .9rem .9rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.side-user .ava { margin-bottom: .4rem; }
.side-user-name { display: block; color: #fff; font-weight: 700; text-decoration: none; }
.side-user-role { color: #9aa6c2; font-size: .8rem; }
.btn-side {
    width: 100%;
    margin-top: .7rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
}
.btn-side:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.workspace {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    background:
        radial-gradient(circle at 82% 12%, rgba(130, 190, 255, .55), transparent 26%),
        radial-gradient(circle at 18% 78%, rgba(150, 90, 255, .42), transparent 32%),
        radial-gradient(circle at 60% 110%, rgba(40, 90, 200, .35), transparent 40%),
        linear-gradient(160deg, #2a1878 0%, #1c3f96 46%, #1a2d68 100%);
}
.workspace::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .45;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .16) 0 1px, transparent 1.5px),
        radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .14) 0 1px, transparent 1.5px),
        linear-gradient(115deg, transparent 0 46%, rgba(255, 255, 255, .05) 46.2%, transparent 46.6% 100%);
    background-size: 140px 140px, 180px 180px, 100% 100%;
}
.topbar, .app-main { position: relative; z-index: 1; }
.topbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 58px;
    padding: .45rem .9rem;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 5;
}
.top-nav { display: flex; gap: .15rem; flex-wrap: wrap; }
.top-link {
    color: rgba(255, 255, 255, .82);
    text-decoration: none;
    font-weight: 650;
    font-weight: 600;
    padding: .4rem .7rem;
    border-radius: 10px;
}
.top-link:hover, .top-link.is-active { background: rgba(255, 255, 255, .16); color: #fff; }
.top-search { margin-left: auto; }
.top-search input {
    width: 210px;
    border: 0;
    border-radius: 999px;
    padding: .4rem .85rem;
    background: rgba(255, 255, 255, .16);
    color: #fff;
}
.top-search input::placeholder { color: rgba(255, 255, 255, .7); }
.top-user { color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.side-toggle {
    display: none;
    border: 1px solid rgba(255, 255, 255, .3);
    background: transparent;
    color: #fff;
    border-radius: 10px;
    padding: .35rem .7rem;
    font-weight: 700;
}
.app-main { padding: 0 1.15rem 2rem; max-width: none; color: #fff; }
.app-stream { max-width: none; }
.app-main .panel,
.app-main .feed-card,
.app-main .link-card,
.app-main .person-card,
.app-main .post,
.app-main .widget,
.app-main .composer,
.app-main .admin-stat,
.app-main .empty-state,
.app-main .table { color: var(--ink); }
.app-main .page-head h1,
.app-main .block-title,
.app-main .stream-title { color: #fff; }
.app-main .page-head .muted { color: rgba(255, 255, 255, .78); }

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.15rem;
}
.page-head h1 { font-size: 1.7rem; margin: 0; letter-spacing: -.03em; font-weight: 700; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.panel, .salon-card, .feed-card, .link-card, .person-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 1px 0 rgba(20, 40, 60, .02);
}
.panel { padding: 1.1rem 1.15rem; margin-bottom: 1rem; }
.panel h2, .block-title { font-size: 1.05rem; margin: 0 0 .8rem; }
.city-name {
    margin: 1.2rem 0 .6rem;
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}
.salon-grid, .link-grid, .split { display: grid; gap: .85rem; }
.salon-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.link-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-bottom: 1.1rem; }
.split { grid-template-columns: minmax(0, 1.6fr) minmax(250px, .85fr); }
.salon-card, .link-card {
    display: block;
    padding: 1rem;
    color: inherit;
    text-decoration: none;
    height: 100%;
}
.salon-card:hover, .link-card:hover, .feed-card:hover { border-color: #b7d5e6; color: inherit; }
.salon-card strong, .link-card strong { display: block; margin-bottom: .25rem; }
.muted, .lead-quiet { color: var(--muted); }
.feed-card {
    display: block;
    padding: .95rem 1rem;
    margin-bottom: .7rem;
    color: inherit;
    text-decoration: none;
}
.feed-meta {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    align-items: center;
    color: var(--muted);
    font-size: .85rem;
    margin-bottom: .35rem;
}
.badge-new, .badge-work, .badge-done, .badge-scope {
    font-weight: 650;
    font-weight: 600;
    border-radius: 999px;
    padding: .35em .7em;
}
.badge-new { background: #fff1e4; color: #9a4e12; }
.badge-work { background: var(--blue-soft); color: #0b6f99; }
.badge-done { background: #eef1f4; color: #5c6770; }
.badge-scope { background: #e8f7e9; color: #1d6b3a; }
.form-control, .form-select { border-radius: 10px; border-color: #d5dee6; }
.form-control:focus, .form-select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 .2rem rgba(26, 163, 223, .16);
}
.empty-state {
    padding: 1.1rem;
    border: 1px dashed #cfdbe3;
    border-radius: 12px;
    color: var(--muted);
    background: rgba(255, 255, 255, .7);
}
.person-card { padding: 1.15rem 1.25rem; }
.person-card dl { display: grid; grid-template-columns: 140px 1fr; gap: .45rem .8rem; margin: 0; }
.person-card dt { color: var(--muted); font-weight: 600; }
.person-card dd { margin: 0; }
.article-body, .task-body { white-space: pre-wrap; line-height: 1.55; }
.birthday-list { list-style: none; padding: 0; margin: 0; }
.birthday-list li { padding: .55rem 0; border-top: 1px solid var(--line); }
.birthday-list li:first-child { border-top: 0; padding-top: 0; }
.table { --bs-table-bg: transparent; }
.table thead th { color: var(--muted); font-size: .82rem; font-weight: 700; border-bottom-color: var(--line); }
.status-switch, .filter-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter-row { margin-bottom: 1rem; }
.filter-row a { text-decoration: none; }
.side-badge {
    margin-left: auto;
    min-width: 1.3rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    font-size: .75rem;
    line-height: 1.3rem;
    text-align: center;
}
.side-badge[hidden] { display: none !important; }
.top-link { display: inline-flex; align-items: center; gap: .4rem; }
.top-link .side-badge { margin-left: 0; background: #fff; color: #1c3f96; }
.msg-toasts {
    position: fixed;
    z-index: 90;
    right: 1.1rem;
    bottom: 1.1rem;
    width: min(360px, calc(100vw - 1.6rem));
    display: flex;
    flex-direction: column;
    gap: .45rem;
    pointer-events: none;
}
.msg-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .75rem .85rem;
    background: #fff;
    color: #1c2430;
    border-radius: 16px;
    text-decoration: none;
    box-shadow: 0 16px 40px rgba(16, 28, 52, .22);
    border: 1px solid #e6ebf2;
}
.msg-toast-copy { display: grid; min-width: 0; }
.msg-toast-copy strong { font-size: .92rem; }
.msg-toast-copy span { color: #5c6b7a; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace { display: flex; flex-direction: column; }
.app-fill {
    max-width: none;
    padding: 0;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.app-fill > .alert { margin: .75rem 1rem 0; }
body.app:has(.msg-app) { height: 100vh; overflow: hidden; }
body.app:has(.msg-app) .shell,
body.app:has(.msg-app) .workspace { height: 100vh; min-height: 0; overflow: hidden; }
body.app:has(.msg-app) .app-fill { flex: 1; min-height: 0; overflow: hidden; }
.msg-app { display: grid; grid-template-columns: 320px minmax(0, 1fr); flex: 1; min-height: 0; height: 100%; overflow: hidden; background: #f4f6f8; position: relative; color: #1c2430; }
.msg-pane[hidden], .manage-box[hidden], .forward-box[hidden], .reply-bar[hidden], .emoji-box[hidden], .call-layer[hidden] { display: none !important; }
.msg-app button, .msg-app input, .msg-app textarea { color: #1c2430; }
.msg-create summary, .msg-send { color: #fff; }
.msg-list { background: #fff; border-right: 1px solid #e4e8ee; display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: hidden; }
.msg-list-head { display: flex; gap: .45rem; padding: .7rem; border-bottom: 1px solid #e4e8ee; position: relative; z-index: 2; }
.msg-list-head .msg-search { flex: 1; min-width: 0; width: auto; }
.msg-search, .msg-pane input[name="title"] { width: 100%; border: 1px solid #d7dee7; border-radius: 10px; padding: .45rem .65rem; background: #f7f9fb; }
.msg-create { position: relative; }
.msg-create summary { list-style: none; cursor: pointer; background: #2f6fed; color: #fff; border-radius: 10px; padding: .45rem .7rem; font-weight: 700; white-space: nowrap; }
.msg-create summary::-webkit-details-marker { display: none; }
.msg-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; background: #fff; border: 1px solid #e4e8ee; border-radius: 12px; box-shadow: 0 10px 30px rgba(20, 32, 54, .12); min-width: 180px; padding: .3rem; }
.msg-menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: .5rem .65rem; border-radius: 8px; font-weight: 650; }
.msg-menu button:hover { background: #f3f6fb; }
.msg-pane { padding: .7rem; border-bottom: 1px solid #e4e8ee; display: grid; gap: .45rem; }
.msg-pane p { margin: 0; font-weight: 700; }
.msg-people { max-height: 220px; overflow: auto; display: grid; gap: .2rem; }
.msg-people button, .msg-people label { display: flex; gap: .5rem; align-items: center; width: 100%; text-align: left; border: 0; background: transparent; padding: .35rem; border-radius: 8px; color: #1c2430; }
.msg-people button span { display: grid; min-width: 0; }
.msg-people button small { color: #6d7b88; font-size: .75rem; }
.staff-hits { border-bottom: 1px solid #e4e8ee; padding: .35rem .55rem .5rem; background: #f8fbff; }
.staff-hits > p { margin: .15rem .35rem .25rem; color: #6d7b88; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.person-write { display: inline; }
.msg-people button:hover, .msg-people label:hover { background: #f3f6fb; }
.msg-items { overflow: auto; flex: 1; min-height: 0; }
.msg-item { display: flex; gap: .65rem; align-items: center; padding: .65rem .75rem; text-decoration: none; color: #1c2430; border-bottom: 1px solid #f0f2f5; }
.msg-item.is-current { background: #e7f0ff; }
.msg-item.is-current strong { color: #1d4f8c; }
.msg-head h1 { color: #1c2430; }
.msg-item-text { min-width: 0; flex: 1; }
.msg-item-text strong, .msg-item-text em { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item-text em { color: #7b8794; font-style: normal; font-size: .82rem; }
.ava { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.ava-sm { width: 28px; height: 28px; }
.ava-lg { width: 96px; height: 96px; font-size: 1.6rem; }
.ava-letter { display: inline-flex; align-items: center; justify-content: center; background: #d9e6fb; color: #24508f; font-weight: 800; }
.msg-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; overflow: hidden; background: #eef3f6; }
.msg-head { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; background: #fff; border-bottom: 1px solid #e4e8ee; }
.msg-head h1 { margin: 0; font-size: 1.15rem; }
.msg-head p { margin: 0; color: #7b8794; font-size: .85rem; }
.msg-head > div:nth-child(2) { flex: 1; min-width: 0; }
.msg-calls { display: flex; gap: .4rem; }
.icon-btn {
    position: relative;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    border-radius: 10px;
    color: #3e4e63;
    padding: 0;
    flex: none;
}
.icon-btn .ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover, .icon-btn:focus-visible { background: #e8eef8; color: #1d4f8c; }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn:hover::after, .icon-btn:focus-visible::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1c2430;
    color: #fff;
    font-size: .72rem;
    font-weight: 650;
    line-height: 1.2;
    padding: .28rem .5rem;
    border-radius: 7px;
    white-space: nowrap;
    z-index: 8;
    pointer-events: none;
    box-shadow: 0 6px 16px rgba(20, 32, 54, .18);
}
.msg-send.icon-btn { width: 42px; height: 42px; border-radius: 12px; background: #2f6fed; color: #fff; }
.msg-send.icon-btn:hover { background: #245ed0; color: #fff; }
.call-actions button { border: 1px solid #d7dee7; background: #fff; border-radius: 10px; padding: .4rem .65rem; font-weight: 700; color: #1c2430; }
.msg-back { display: none; font-weight: 700; text-decoration: none; }
.msg-log { flex: 1; min-height: 0; overflow: auto; padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.msg-log > * { flex: 0 0 auto; }
.msg-day { align-self: center; background: rgba(255, 255, 255, .92); color: #66788a; border-radius: 999px; padding: .15rem .7rem; font-size: .78rem; margin: .15rem 0; position: sticky; top: 0; z-index: 1; }
.msg-line { display: flex; gap: .5rem; align-items: flex-end; align-self: flex-start; max-width: min(640px, 100%); }
.bubble { position: relative; width: fit-content; max-width: 100%; background: #fff; color: #1c2430; border: 1px solid #e6ebf1; border-radius: 4px 16px 16px 16px; padding: .4rem .7rem .35rem; box-shadow: 0 1px 2px rgba(20, 32, 54, .05); }
.bubble.mine { background: #e7f1ff; border-color: #d5e6fa; color: #1c2430; }
.bubble p { margin: .1rem 0; white-space: pre-wrap; color: #1c2430; }
.bubble-name { color: #1d4f8c; font-size: .78rem; font-weight: 700; }
.bubble-forward, .bubble-edited, .bubble-gone { color: #66788a; font-size: .78rem; }
.bubble-reply { margin: .2rem 0; padding: .25rem .45rem; border-left: 3px solid #2f6fed; background: rgba(47, 111, 237, .08); border-radius: 6px; color: #1c2430; }
.bubble-reply b, .bubble-reply span { display: block; }
.bubble-reply span { color: #4d5966; font-size: .82rem; }
.bubble-meta { display: flex; justify-content: flex-end; gap: .35rem; align-items: center; }
.bubble time { color: #6d7b88; font-size: .72rem; }
.bubble-reacts { display: flex; gap: .25rem; margin-top: .15rem; }
.react { background: #f3f6fb; color: #1c2430; border-radius: 999px; padding: .05rem .4rem; font-size: .78rem; }
.react.is-mine { background: #d7e8ff; }
.bubble-actions {
    position: absolute;
    top: -18px;
    left: 10px;
    display: flex;
    gap: 0;
    opacity: 0;
    background: #fff;
    border: 1px solid #e4e8ee;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(20, 32, 54, .12);
    padding: 2px;
    z-index: 3;
}
.bubble:hover .bubble-actions, .bubble:focus-within .bubble-actions { opacity: 1; }
.bubble-actions .icon-btn { width: 30px; height: 30px; }
.bubble-actions .icon-btn:hover::after { bottom: auto; top: calc(100% + 6px); }
.manage-box, .forward-box { background: #fff; color: #1c2430; border-bottom: 1px solid #e4e8ee; padding: .75rem 1rem; display: grid; gap: .6rem; }
.manage-row, .manage-members li, .reply-bar { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.manage-row input[name="title"] { flex: 1; border: 1px solid #d7dee7; border-radius: 10px; padding: .4rem .6rem; color: #1c2430; }
.manage-members ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.manage-members button, .forward-box button, .reply-bar button { border: 0; background: transparent; color: #1d4f8c; font-weight: 700; }
.manage-members span { color: #6d7b88; }
.forward-box { position: absolute; right: 1rem; bottom: 5.5rem; z-index: 4; width: min(280px, calc(100% - 2rem)); border: 1px solid #e4e8ee; border-radius: 12px; box-shadow: 0 10px 30px rgba(20, 32, 54, .12); }
#forward-list { display: grid; gap: .15rem; max-height: 220px; overflow: auto; }
.reply-bar { flex: 1 0 100%; background: #f3f6fb; border-radius: 10px; padding: .35rem .6rem; color: #1c2430; }
.reply-bar span { flex: 1; min-width: 0; }
.bubble-img { max-width: 240px; border-radius: 10px; display: block; }
.bubble-file { display: inline-block; font-weight: 700; }
.msg-head, .msg-compose, .msg-list-head { flex: none; }
.msg-compose { display: flex; flex-wrap: wrap; gap: .35rem; align-items: flex-end; padding: .55rem .75rem; background: #fff; border-top: 1px solid #e4e8ee; color: #1c2430; }
.msg-compose textarea { flex: 1; border: 1px solid #d7dee7; border-radius: 12px; padding: .55rem .7rem; resize: none; min-height: 42px; max-height: 140px; }
.msg-send { background: #2f6fed; color: #fff; border-color: #2f6fed; }
.msg-hint { margin: 0; padding: 0 .9rem .45rem; background: #fff; color: #8b98a5; font-size: .75rem; }
.msg-placeholder, .msg-empty { margin: auto; color: #7b8794; padding: 1rem; }
.emoji-box { position: absolute; left: 340px; bottom: 76px; background: #fff; border: 1px solid #e4e8ee; border-radius: 12px; padding: .35rem; display: flex; flex-wrap: wrap; width: 280px; box-shadow: 0 10px 30px rgba(20, 32, 54, .12); }
.emoji-box button { border: 0; background: transparent; font-size: 1.25rem; padding: .15rem; }
.call-layer { position: absolute; inset: 0; background: rgba(17, 24, 39, .45); display: flex; align-items: center; justify-content: center; z-index: 6; }
.call-card { width: min(720px, calc(100% - 2rem)); background: #111827; color: #fff; border-radius: 16px; padding: 1rem; }
.call-title { margin: 0 0 .7rem; font-weight: 700; }
.call-videos { display: flex; flex-wrap: wrap; gap: .5rem; }
.call-videos video { width: min(320px, 100%); background: #000; border-radius: 12px; max-height: 360px; }
.call-actions { display: flex; gap: .5rem; margin-top: .8rem; }
.person-layout { display: grid; grid-template-columns: 220px 1fr; gap: 1.2rem; align-items: start; }
.person-photo { display: grid; justify-items: start; gap: .55rem; }
.avatar-form { display: flex; flex-wrap: wrap; gap: .4rem; }
.crm-tabs, .crm-tools { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .9rem; align-items: center; }
.crm-tools .form-control { max-width: 280px; }
.crm-empty { color: var(--muted); text-align: center; padding: 2.4rem 1rem; }

.stream, .with-rail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.stream-side { position: sticky; top: 70px; }
.composer, .post, .widget, .admin-stat {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 14px 36px rgba(10, 16, 48, .22);
}
.composer { padding: .85rem .95rem .7rem; margin-bottom: .9rem; }
.composer textarea {
    width: 100%;
    border: 0;
    resize: vertical;
    min-height: 74px;
    font-size: 1.05rem;
    outline: none;
}
.composer-bar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.stream-title { font-size: 1.35rem; margin: .2rem 0 .7rem; }
.post { padding: 1rem 1.05rem .75rem; margin-bottom: .8rem; }
.post h2 { font-size: 1.15rem; margin: .75rem 0 .35rem; }
.post h2 a { color: var(--ink); text-decoration: none; }
.post p { margin: 0; white-space: pre-wrap; }
.post-head { display: flex; gap: .7rem; align-items: center; }
.post-author { font-weight: 700; color: var(--ink); text-decoration: none; }
.post-meta, .widget-note { color: var(--muted); font-size: .86rem; }
.post-actions { display: flex; gap: 1rem; margin-top: .75rem; padding-top: .55rem; border-top: 1px solid #eef2f6; }
.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(145deg, #4d8dff, #7a5cff);
    color: #fff;
    font-weight: 700;
    flex: none;
}
.avatar-lg { width: 64px; height: 64px; font-size: 1.2rem; }
.widget { padding: .95rem 1rem; margin-bottom: .75rem; }
.widget h2 { font-size: 1rem; margin: 0 0 .35rem; }
.widget-me { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; }
.stat-row {
    display: flex;
    justify-content: space-between;
    padding: .45rem 0;
    border-top: 1px solid #eef2f6;
    color: var(--ink);
    text-decoration: none;
}
.rail-item, .rail-more, .rail-links a {
    display: block;
    text-decoration: none;
    color: var(--ink);
}
.rail-item { padding: .45rem 0; border-top: 1px solid #eef2f6; }
.rail-item b { display: block; font-size: .92rem; }
.rail-item span, .rail-more { color: var(--muted); font-size: .82rem; font-weight: 600; }
.rail-more { margin-top: .45rem; }
.rail-links { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.rail-links a { background: #f4f8fb; border-radius: 10px; padding: .55rem .6rem; font-weight: 700; }
.admin-bar { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.admin-bar a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    background: rgba(255, 255, 255, .16);
    border-radius: 999px;
    padding: .38rem .85rem;
}
.admin-bar a.is-on { background: #fff; color: #241a62; }
.admin-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.admin-stat { padding: .95rem 1rem; }
.admin-stat span { color: var(--muted); font-size: .86rem; }
.admin-stat b { display: block; font-size: 1.7rem; line-height: 1.2; color: #241a62; }
.desk { margin: 0; background: #e6ebf0; color: #243044; font-family: "Segoe UI", sans-serif; }
.desk-top {
    height: 48px;
    display: flex;
    align-items: stretch;
    background: #fff;
    border-bottom: 1px solid #d5dee6;
}
.desk-top a, .desk-top button {
    display: inline-flex;
    align-items: center;
    padding: 0 1rem;
    color: #3d4b5c;
    text-decoration: none;
    background: transparent;
    border: 0;
    border-right: 1px solid #e4ebf1;
    font-weight: 700;
}
.desk-top a.is-on { background: #eef3f7; color: #1d4f8c; }
.desk-user { margin-left: auto; display: inline-flex; align-items: center; padding: 0 1rem; font-weight: 700; }
.desk-body { display: flex; min-height: calc(100vh - 48px); }
.desk-rail {
    width: 92px;
    flex: none;
    background: #3d4652;
    display: flex;
    flex-direction: column;
    padding: .4rem 0;
}
.desk-rail a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    color: #d5dde6;
    text-decoration: none;
    font-size: .68rem;
    font-weight: 700;
    text-align: center;
    padding: .55rem .3rem;
}
.desk-rail a .ico { width: 1.35rem; height: 1.35rem; }
.desk-rail a:hover, .desk-rail a.is-on { background: #2f3742; color: #fff; }
.desk-sub {
    width: 230px;
    flex: none;
    background: #f7f9fb;
    border-right: 1px solid #d7e0e8;
    padding: .8rem .7rem;
}
.desk-sub-title { margin: 0 .4rem .4rem; color: #7b8794; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.desk-sub a { display: block; padding: .42rem .55rem; border-radius: 8px; color: #243044; text-decoration: none; font-weight: 650; font-weight: 600; }
.desk-sub a.is-on, .desk-sub a:hover { background: #e7eef6; color: #1d4f8c; }
.desk-main { flex: 1; min-width: 0; padding: 1rem 1.15rem 2rem; }
.desk-main h1 { font-size: 1.35rem; margin: 0 0 .9rem; color: #243044; }
.desk-actions { margin: -.3rem 0 .8rem; }
.gadget-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.gadget { background: #fff; border: 1px solid #d7e0e8; border-radius: 4px; }
.gadget header { padding: .55rem .8rem; border-bottom: 1px solid #e6edf3; color: #1d4f8c; font-weight: 700; }
.gadget-body { padding: .35rem .8rem .7rem; }
.gadget-row, .gadget-line { display: block; text-decoration: none; color: #243044; padding: .45rem 0; border-bottom: 1px solid #eef2f6; }
.gadget-row { display: flex; justify-content: space-between; }
.gadget-row b { color: #1d4f8c; }
.gadget-line small, .gadget-note { display: block; color: #6d7b88; font-size: .82rem; }
.desk-sub nav + .desk-sub-title { margin-top: 1rem; }
.settings-stack { display: grid; gap: .85rem; max-width: 760px; }
.settings-fields { display: grid; gap: .85rem; padding-top: .45rem; }
.set-field label, .set-check { color: #243044; font-weight: 650; }
.set-check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 600; }
.set-num { max-width: 8rem; }
.backup-restore { margin-top: .85rem; }
.backup-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid #eef2f6; }
.backup-row small, .backup-inline { color: #6d7b88; }
.backup-row small { display: block; font-size: .82rem; }
.backup-actions, .backup-inline { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.backup-inline { padding: 0 0 .8rem; }
.backup-inline .form-control { max-width: 220px; }
.gadget-note { padding: .55rem 0 0; }
.desk-crumb { color: #6d7b88; font-size: .86rem; margin: -.4rem 0 .7rem; }
.desk-crumb a { color: #1d4f8c; text-decoration: none; }
.user-head { display: flex; gap: .7rem; align-items: center; margin-bottom: .7rem; }
.user-search { flex: 1; }
.user-search input {
    width: min(480px, 100%);
    border: 1px solid #cfd8e0;
    border-radius: 4px;
    padding: .5rem .75rem;
    background: #fff;
}
.btn-add {
    margin-left: auto;
    background: #2f6fde;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: .02em;
    border-radius: 3px;
    padding: .55rem .85rem;
    white-space: nowrap;
}
.btn-add:hover { color: #fff; background: #245ec4; }
.user-table tr.is-picked { background: #f3f6c4; }
.user-table a { color: #1d4f8c; font-weight: 650; font-weight: 600; text-decoration: none; }
.user-table td, .user-table th { vertical-align: middle; }
.user-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-top: .65rem;
    background: #fff;
    border: 1px solid #d7e0e8;
    padding: .55rem .7rem;
}
.user-op, .user-all { display: inline-flex; align-items: center; gap: .35rem; margin: 0; color: #243044; font-weight: 600; }
.user-count { margin-left: auto; color: #6d7b88; font-size: .85rem; }
.desk .panel { color: #243044; }
.msg-app { min-height: 0; }

@media (max-width: 900px) {
    .site-nav { display: none; }
    .hero-grid, .look-grid, .tool-grid, .split, .person-card dl, .stream, .with-rail, .admin-grid, .gadget-grid, .rail-links { grid-template-columns: 1fr; }
    .stream-side { position: static; }
    .desk-body { flex-direction: column; }
    .desk-rail { width: 100%; flex-direction: row; overflow: auto; }
    .desk-rail a { min-width: 76px; }
    .desk-sub { width: 100%; border-right: 0; border-bottom: 1px solid #d7e0e8; }
    .desk-user { display: none; }
    .user-head { flex-wrap: wrap; }
    .btn-add { margin-left: 0; }
    .user-count { margin-left: 0; }
    .side-toggle { display: inline-flex; }
    .top-search input { width: 120px; }
    .side {
        position: fixed;
        z-index: 30;
        transform: translateX(-105%);
        transition: transform .18s ease;
        box-shadow: var(--shadow);
    }
    .side.open { transform: none; }
    .app-main { padding: 1rem; }
    .app-main.app-fill { padding: 0; }
    .msg-app { grid-template-columns: 1fr; height: 100%; }
    .bubble-actions { position: static; opacity: 1; box-shadow: none; border: 0; background: transparent; padding: 0; margin-top: .15rem; }
    .msg-app.has-thread .msg-list { display: none; }
    .msg-back { display: inline-block; }
    .emoji-box { left: .5rem; }
    .person-layout { grid-template-columns: 1fr; }
    .page-head { flex-direction: column; align-items: flex-start; }
}
