:root {
    font-family: "Segoe UI", Arial, sans-serif;
    color: #25283b;
    background: #f5f6fb;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    --purple: #7060d8;
    --purple-dark: #5848c3;
    --muted: #898da1;
    --line: #ececf3;
    --panel: #fff;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; }

button, input, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.topbar {
    height: 72px;
    padding: 0 max(28px, calc((100% - 1410px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    background: #fff;
    border-bottom: 1px solid #eeeff5;
}

.brand { display: flex; align-items: center; gap: 10px; font: 800 20px "Segoe UI", Arial, sans-serif; letter-spacing: -1px; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: var(--purple); border-radius: 11px; font-size: 19px; }
.brand-light { color: var(--purple); }
.search { width: min(390px, 38vw); height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 12px; color: #9a9daf; background: #f6f6fa; border: 1px solid #f0f0f5; border-radius: 10px; }
.search > span { font-size: 22px; transform: rotate(-20deg); }
.search input { flex: 1; width: 0; border: 0; outline: 0; background: transparent; color: #33364a; font-size: 12px; }
.search input::placeholder { color: #a1a3b2; }
.search kbd { padding: 3px 5px; background: #fff; border: 1px solid #e8e8f0; border-radius: 4px; font-size: 10px; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 21px; }
.icon-button, .profile-button, .more-button, .text-button, .filter-button { border: 0; background: none; cursor: pointer; }
.icon-button { position: relative; font-size: 23px; color: #6d7083; }
.notification-dot { width: 7px; height: 7px; display: inline-block; background: #ef817c; border-radius: 50%; }
.notification-button .notification-dot { position: absolute; top: 2px; right: 0; border: 1px solid #fff; }
.profile-button { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 700; }
.header-login { color: var(--purple-dark); font-size: 11px; font-weight: 700; white-space: nowrap; }
.header-login:hover { text-decoration: underline; }

.layout { width: min(1410px, calc(100% - 56px)); margin: 30px auto 50px; display: grid; grid-template-columns: 252px minmax(400px, 1fr) 300px; align-items: start; gap: 25px; }
.left-column, .right-column, .feed-column { min-width: 0; }
.left-column, .right-column { display: grid; gap: 18px; }
.panel { background: var(--panel); border: 1px solid #eeeff5; border-radius: 13px; box-shadow: 0 3px 14px rgba(40, 42, 75, .025); }

.profile-card { position: relative; padding: 0 18px 17px; text-align: center; overflow: hidden; }
.profile-cover { height: 73px; margin: 0 -18px; background: linear-gradient(120deg, #d9d4fb, #f8dfe8 56%, #f9e9d8); }
.avatar { width: 38px; height: 38px; flex: 0 0 auto; display: inline-grid; place-items: center; border-radius: 50%; font-weight: 700; font-size: 14px; }
.avatar-you { color: #5140ab; background: #e2defd; }
.avatar-large { width: 70px; height: 70px; position: relative; margin-top: -35px; border: 4px solid #fff; font-size: 23px; }
.profile-card h1 { margin: 4px 0 5px; font: 800 16px "Segoe UI", Arial, sans-serif; }
.muted, .campus-label { color: var(--muted); font-size: 11px; }
.profile-card .muted { margin: 0; }
.campus-label { margin: 10px 0 15px; }
.campus-label span { color: var(--purple); font-size: 15px; }
.profile-stats { display: flex; justify-content: space-around; padding-top: 13px; border-top: 1px solid var(--line); }
.profile-stats div { display: grid; gap: 3px; }
.profile-stats strong { font-size: 14px; }
.profile-stats span { color: var(--muted); font-size: 10px; }

.side-nav { padding: 8px; }
.side-link { min-height: 41px; display: flex; align-items: center; gap: 12px; padding: 0 11px; border-radius: 8px; color: #6f7286; font-size: 12px; font-weight: 600; }
.side-link:hover, .side-link.active { color: var(--purple-dark); background: #f1efff; }
.side-icon { width: 18px; text-align: center; font-size: 17px; }
.nav-count { margin-left: auto; padding: 2px 7px; border-radius: 10px; color: #fff; background: var(--purple); font-size: 10px; }
.side-link .online-dot { margin-left: auto; }
.online-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #57bf89; }

.clubs-card { padding: 17px 15px 11px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.section-heading h2, .feed-toolbar h2 { margin: 0; font: 800 13px "Segoe UI", Arial, sans-serif; }
.section-heading > a { color: var(--purple); font-size: 10px; font-weight: 700; white-space: nowrap; }
.club-link { display: flex; align-items: center; gap: 10px; margin-top: 15px; font-size: 11px; font-weight: 700; }
.club-link small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 400; }
.club-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; font-size: 16px; }
.club-purple { color: #7866d6; background: #efedff; }
.club-orange { color: #e2934f; background: #fff1e2; }
.club-green { color: #439b79; background: #e3f5ed; }
.sidebar-footer { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 3px; color: #989bad; font-size: 9px; }
.sidebar-footer p { width: 100%; margin: 0; }

.welcome-row { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 0 2px 17px; }
.eyebrow { margin: 0 0 5px; color: #a2a3b2; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.welcome-row h2 { margin: 0; font: 800 19px "Segoe UI", Arial, sans-serif; letter-spacing: -.5px; }
.campus-pill { padding: 7px 10px; color: #74778a; background: #fff; border: 1px solid #ececf3; border-radius: 20px; font-size: 9px; white-space: nowrap; }
.campus-pill .online-dot { margin-right: 5px; }
.stories-section { padding: 17px 18px 14px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.text-button { padding: 5px 0 5px 6px; color: var(--purple); font-size: 10px; font-weight: 700; white-space: nowrap; }
.stories-list { display: flex; gap: 16px; overflow-x: auto; padding: 15px 1px 2px; scrollbar-width: thin; }
.story-card { min-width: 53px; display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; font-size: 9px; }
.story-avatar { width: 47px; height: 47px; display: grid; place-items: center; border: 2px solid #fff; outline: 2px solid #8373e2; border-radius: 50%; font-size: 15px; font-weight: 700; }
.story-add-avatar { border: 1px dashed #c9c5e8; outline: 0; color: var(--purple); background: #f7f6ff; font-size: 22px; font-weight: 400; }
.story-maya, .avatar-maya { color: #9d5a77; background: #f4dce6; }
.story-alex, .avatar-alex { color: #a66333; background: #fbe4cd; }
.story-sam, .avatar-sam { color: #507e6d; background: #dceddf; }
.story-taylor, .avatar-taylor { color: #665ab1; background: #e7e0fa; }
.story-chris, .avatar-chris { color: #4b7f91; background: #d9edf1; }
.avatar-nina { color: #a26758; background: #f6e1d8; }

.composer { margin-top: 16px; padding: 15px 17px 12px; }
.composer-top { display: flex; align-items: flex-start; gap: 11px; }
.composer-top .avatar { margin-top: 2px; }
.composer textarea { width: 100%; resize: vertical; min-height: 47px; padding: 10px 12px; border: 0; outline: none; color: #33364a; background: #f7f7fb; border-radius: 9px; font-size: 11px; }
.composer textarea::placeholder { color: #a0a2b1; }
.composer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-left: 49px; }
.composer-hint { color: #9a9cac; font-size: 9px; }
.primary-button { padding: 9px 16px; border: 0; border-radius: 8px; color: #fff; background: var(--purple); cursor: pointer; font-size: 10px; font-weight: 700; transition: background .15s, transform .15s; }
.primary-button:hover { background: var(--purple-dark); transform: translateY(-1px); }
.form-message { margin: 7px 0 0 49px; color: #b04f57; font-size: 10px; }
.form-message:empty { display: none; }

.feed-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 21px 2px 10px; }
.feed-toolbar h2 { font-size: 14px; }
.filter-button { padding: 7px 10px; border: 1px solid #eeeff5; border-radius: 7px; background: #fff; font-size: 10px; }
.filter-button span { margin-left: 6px; color: #8d90a3; }
.post-card { padding: 16px 17px 7px; margin-bottom: 12px; }
.post-header { display: flex; align-items: center; gap: 10px; }
.post-author { flex: 1; display: grid; gap: 3px; }
.post-author strong { font-size: 11px; }
.post-author span { color: var(--muted); font-size: 9px; }
.more-button { padding: 2px 0 7px 8px; color: #9193a4; font-size: 20px; letter-spacing: 1px; }
.post-copy { margin: 13px 0 9px; color: #55586a; font-size: 11px; line-height: 1.65; }
.post-tags { display: flex; gap: 10px; }
.post-tags a { color: var(--purple); font-size: 10px; }
.post-reactions { display: flex; justify-content: space-between; margin: 14px 0 0; padding-bottom: 9px; color: #9294a4; font-size: 9px; border-bottom: 1px solid var(--line); }
.post-actions { display: flex; justify-content: space-around; padding: 9px 0 2px; }
.post-actions button { padding: 4px; border: 0; background: none; color: #8c8fa1; cursor: pointer; font-size: 12px; }
.post-actions button span { margin-left: 4px; font-size: 10px; }
.post-actions .liked { color: #de6d8c; }
.comments-area { display: grid; gap: 12px; padding: 12px 0 7px; border-top: 1px solid var(--line); }
.comments-area[hidden] { display: none; }
.comments-list { display: grid; gap: 10px; }
.comment-item, .comment-form { display: flex; align-items: flex-start; gap: 9px; }
.comment-item .avatar, .comment-form .avatar { width: 30px; height: 30px; font-size: 11px; }
.comment-content { min-width: 0; padding: 8px 10px; border-radius: 10px; background: #f6f6fa; }
.comment-content strong { font-size: 9px; }
.comment-content p { margin: 4px 0 0; color: #55586a; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.comment-input-group { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 8px; }
.comment-input-group textarea { flex: 1; min-width: 0; min-height: 36px; max-height: 120px; resize: vertical; padding: 9px 10px; border: 1px solid #eeeff5; border-radius: 9px; outline-color: var(--purple); background: #fafafd; font-size: 10px; }
.comment-input-group .primary-button { flex: 0 0 auto; padding: 9px 11px; }

.friends-card, .events-card, .messages-card { padding: 16px 14px 13px; }
.friends-card .section-heading, .events-card .section-heading, .messages-card .section-heading { margin-bottom: 15px; }
.suggestion { display: flex; align-items: center; gap: 8px; margin: 13px 0; }
.suggestion .avatar { width: 34px; height: 34px; font-size: 12px; }
.suggestion-info { flex: 1; min-width: 0; display: grid; gap: 3px; }
.suggestion-info strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-info span { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.add-friend-button { width: 27px; height: 27px; flex: 0 0 auto; border: 0; border-radius: 8px; color: var(--purple); background: #f1efff; cursor: pointer; font-size: 16px; }
.add-friend-button.added { color: #42916b; background: #e7f6ee; font-size: 12px; }
.all-friends-link { display: flex; justify-content: space-between; margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--purple); font-size: 9px; font-weight: 700; }
.event { display: flex; gap: 10px; margin: 14px 0 0; }
.event-date { width: 38px; height: 41px; flex: 0 0 auto; display: grid; align-content: center; justify-items: center; border-radius: 8px; color: #6757c5; background: #f0eeff; }
.event-date strong { font-size: 14px; line-height: 1; }
.event-date span { margin-top: 3px; font-size: 8px; font-weight: 700; }
.event-date-peach { color: #c9774e; background: #fff0e7; }
.event > div:last-child { display: grid; gap: 3px; align-content: center; }
.event > div:last-child strong { font-size: 9px; }
.event > div:last-child span, .event > div:last-child small { color: var(--muted); font-size: 8px; }
.conversation { width: 100%; display: flex; align-items: center; gap: 9px; padding: 8px 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.conversation > .avatar { position: relative; width: 34px; height: 34px; font-size: 12px; }
.presence { width: 8px; height: 8px; position: absolute; right: -1px; bottom: -1px; border: 2px solid #fff; border-radius: 50%; background: #57bf89; }
.conversation-info { flex: 1; min-width: 0; display: grid; gap: 4px; }
.conversation-info strong { font-size: 10px; }
.conversation-info span { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.conversation-time { align-self: flex-start; color: #a0a2b1; font-size: 8px; }
.right-footer { padding: 0 3px; line-height: 1.5; }

.app-dialog { width: min(420px, calc(100% - 32px)); padding: 25px; border: 1px solid #eeeff5; border-radius: 15px; color: #25283b; box-shadow: 0 18px 70px rgba(26, 27, 55, .22); }
.app-dialog::backdrop { background: rgba(31, 31, 53, .42); backdrop-filter: blur(2px); }
.app-dialog > form:first-child { position: absolute; top: 12px; right: 14px; }
.dialog-close { width: 29px; height: 29px; border: 0; border-radius: 50%; color: #787b8d; background: #f4f4f8; cursor: pointer; font-size: 20px; line-height: 1; }
.app-dialog h2 { margin: 0 0 7px; font: 800 17px "Segoe UI", Arial, sans-serif; }
.app-dialog > p { margin: 0 0 17px; color: var(--muted); font-size: 11px; }
.app-dialog textarea { width: 100%; padding: 12px; resize: vertical; border: 1px solid #e9e9f1; border-radius: 9px; outline-color: var(--purple); font-size: 12px; }
.dialog-submit { display: block; margin: 13px 0 0 auto; }
.chat-dialog { width: min(390px, calc(100% - 28px)); padding: 0; overflow: hidden; }
.chat-dialog-header { display: flex; align-items: center; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.chat-dialog-header > div { flex: 1; }
.chat-dialog-header h2 { margin: 0 0 4px; font-size: 13px; }
.chat-dialog-header p { margin: 0; color: var(--muted); font-size: 9px; }
.chat-dialog-header .online-dot { margin-right: 4px; }
.chat-dialog-header .dialog-close { align-self: flex-start; }
.chat-messages { height: 260px; display: flex; flex-direction: column; gap: 9px; overflow-y: auto; padding: 15px; background: #fbfbfd; }
.chat-bubble { max-width: 80%; padding: 9px 11px; border-radius: 12px; background: #eeedf8; color: #55576b; font-size: 10px; line-height: 1.5; }
.chat-bubble.mine { align-self: flex-end; color: #fff; background: var(--purple); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form input { min-width: 0; flex: 1; padding: 9px 11px; border: 1px solid #e9e9f1; border-radius: 8px; outline-color: var(--purple); font-size: 10px; }
.story-view-dialog { min-height: 300px; display: none; align-content: center; text-align: center; background: linear-gradient(150deg, #f3edff, #fff4ea); }
.story-view-dialog[open] { display: grid; }
.story-view-dialog > form:first-child { position: absolute; top: 12px; right: 14px; }
.story-view-dialog .eyebrow { margin-bottom: 12px; }
.story-view-dialog h2 { font-size: 20px; }
.story-view-copy { margin: 18px 0 0 !important; color: #54566a !important; font-size: 15px !important; line-height: 1.5; }
.sr-only { width: 1px; height: 1px; position: absolute; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

@media (max-width: 1100px) {
    .layout { grid-template-columns: 220px minmax(350px, 1fr); gap: 20px; }
    .right-column { grid-column: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .right-footer { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    .topbar { height: 62px; padding: 0 16px; gap: 12px; }
    .brand { font-size: 17px; }
    .brand-mark { width: 30px; height: 30px; }
    .search { width: auto; flex: 1; }
    .search kbd, .profile-name, .profile-button > span:last-child, .notification-button { display: none; }
    .topbar-actions { gap: 8px; }
    .profile-button { padding: 0; }
    .layout { width: min(100% - 28px, 550px); margin: 21px auto 35px; display: flex; flex-direction: column; gap: 18px; }
    .left-column { display: block; width: 100%; }
    .profile-card, .clubs-card, .sidebar-footer { display: none; }
    .side-nav { display: flex; gap: 2px; padding: 6px; overflow-x: auto; }
    .side-link { flex: 0 0 auto; gap: 6px; padding: 0 9px; font-size: 10px; }
    .side-link .nav-count, .side-link .online-dot { display: none; }
    .feed-column { width: 100%; }
    .right-column { width: 100%; display: grid; grid-template-columns: 1fr; }
    .right-footer { display: flex; }
    .welcome-row h2 { font-size: 17px; }
    .campus-pill { font-size: 8px; padding: 6px 8px; }
}

@media (max-width: 410px) {
    .brand { gap: 7px; font-size: 15px; }
    .search { gap: 5px; padding: 0 8px; }
    .search input { font-size: 10px; }
    .welcome-row { align-items: flex-start; flex-direction: column; }
    .composer-hint { max-width: 170px; line-height: 1.4; }
    .stories-list { gap: 12px; }
}
