:root {
  color-scheme: light;
  --ink: #262235;
  --muted: #797386;
  --line: #e9e5ef;
  --surface: rgba(255, 255, 255, 0.9);
  --soft: #f7f5fa;
  --violet: #7753d6;
  --violet-dark: #5e3dbb;
  --pink: #e879a7;
  --green: #42a37a;
  --shadow: 0 22px 60px rgba(58, 42, 92, 0.12);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: #f9f7fb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
button { color: inherit; }

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
  opacity: .55;
  pointer-events: none;
}

.ambient-one { width: 520px; height: 520px; top: -260px; right: -140px; background: radial-gradient(circle, #e9ddff, transparent 70%); }
.ambient-two { width: 460px; height: 460px; bottom: -240px; left: -120px; background: radial-gradient(circle, #ffddea, transparent 70%); }

.eyebrow {
  margin: 0 0 10px;
  color: var(--violet);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .17em;
}

.brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 19px;
  color: white;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  box-shadow: 0 14px 32px rgba(119, 83, 214, .28);
  font-family: Georgia, serif;
  font-size: 35px;
  line-height: 1;
}

.brand-mark.small { width: 42px; height: 42px; border-radius: 14px; font-size: 25px; }

.auth-shell {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(380px, 460px);
  gap: clamp(60px, 9vw, 150px);
  align-items: center;
  width: min(1180px, calc(100% - 80px));
  min-height: 100vh;
  margin: auto;
  padding: 64px 0;
}

.auth-intro h1 {
  max-width: 700px;
  margin: 26px 0 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 6vw, 78px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.045em;
}

.auth-intro h1 span { color: var(--violet); }
.auth-copy { max-width: 560px; color: var(--muted); font-size: 19px; line-height: 1.65; }

.feature-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.feature-row span { padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; color: #645e70; background: rgba(255,255,255,.58); font-size: 13px; font-weight: 700; }

.auth-card {
  padding: 40px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-card-heading h2, .modal-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 32px; font-weight: 500; }
.auth-card-heading > p:last-child { margin: 10px 0 0; color: var(--muted); }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 28px 0 22px; padding: 5px; border-radius: 13px; background: var(--soft); }
.auth-tab { padding: 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; }
.auth-tab.active { color: var(--ink); background: white; box-shadow: 0 4px 14px rgba(42,34,60,.08); }

.auth-form { display: grid; gap: 17px; }
label { display: grid; gap: 8px; color: #5d5669; font-size: 13px; font-weight: 750; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: white;
  transition: border-color .18s, box-shadow .18s;
}
input { height: 48px; padding: 0 14px; }
textarea { min-height: 120px; padding: 13px 14px; line-height: 1.55; resize: vertical; }
input:focus, textarea:focus { border-color: #ae98ea; box-shadow: 0 0 0 4px rgba(119,83,214,.09); }

.primary-button, .secondary-button, .icon-button, .send-button {
  border: 0;
  cursor: pointer;
  transition: transform .16s, background .16s, opacity .16s;
}
.primary-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 7px; padding: 0 18px; border-radius: 12px; color: white; background: var(--violet); font-weight: 800; box-shadow: 0 9px 22px rgba(119,83,214,.22); }
.primary-button:hover { background: var(--violet-dark); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .6; transform: none; }
.primary-button.full { width: 100%; margin-top: 4px; }
.secondary-button { min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 12px; background: white; font-weight: 750; }
.icon-button { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: var(--muted); background: transparent; font-size: 20px; }
.icon-button:hover { color: var(--ink); background: var(--soft); }
.form-error { min-height: 19px; margin: 14px 0 0; color: #bd3a58; font-size: 13px; }

.app-shell { display: grid; grid-template-columns: 258px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 30px 22px 24px; border-right: 1px solid var(--line); background: rgba(255,255,255,.82); backdrop-filter: blur(18px); }
.sidebar-brand { display: flex; align-items: center; gap: 13px; padding: 0 7px; }
.sidebar-brand strong { display: block; font-family: Georgia, serif; font-size: 18px; }
.sidebar-brand span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.main-nav { display: grid; gap: 6px; margin-top: 52px; }
.nav-button { position: relative; display: flex; align-items: center; gap: 13px; padding: 12px 14px; border: 0; border-radius: 12px; color: #746e7d; background: transparent; cursor: pointer; text-align: left; font-weight: 730; }
.nav-button > span { display: grid; width: 25px; height: 25px; place-items: center; color: #9387a2; font-size: 18px; }
.nav-button:hover { color: var(--ink); background: var(--soft); }
.nav-button.active { color: var(--violet); background: #f0ebff; }
.nav-button.active > span { color: var(--violet); }
.nav-button i { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: var(--pink); }
.sidebar-footer { display: grid; gap: 13px; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); }
.user-badge { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-badge > span { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: white; background: linear-gradient(135deg, #7b5dde, #d873a1); font-size: 13px; font-weight: 900; }
.user-badge strong, .user-badge small { display: block; overflow: hidden; max-width: 116px; text-overflow: ellipsis; white-space: nowrap; }
.user-badge strong { font-size: 13px; }.user-badge small { margin-top: 2px; color: var(--green); font-size: 10px; }
.logout-button { display: flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); border-radius: 11px; color: #746d7d; background: white; cursor: pointer; font-size: 12px; font-weight: 800; transition: color .16s, border-color .16s, background .16s; }
.logout-button:hover { border-color: #eccbd4; color: #b6415c; background: #fff5f7; }

.workspace { min-width: 0; padding: 46px clamp(34px, 5vw, 76px) 60px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.topbar h1 { margin: 0; font-family: Georgia, serif; font-size: 46px; font-weight: 500; letter-spacing: -.025em; }
.topbar > div > p:last-child { margin: 8px 0 0; color: var(--muted); }
.view { animation: reveal .22s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } }

.welcome-card { display: flex; min-height: 190px; align-items: center; justify-content: space-between; gap: 30px; overflow: hidden; padding: 34px 38px; border-radius: 23px; color: white; background: linear-gradient(125deg, #6e4dca, #9d61d7 58%, #df7da9); box-shadow: 0 18px 45px rgba(103,71,183,.22); }
.welcome-card .eyebrow { color: rgba(255,255,255,.72); }.welcome-card h2 { max-width: 650px; margin: 0; font-family: Georgia, serif; font-size: 34px; font-weight: 500; }.welcome-card p:last-child { margin: 10px 0 0; color: rgba(255,255,255,.78); }
.welcome-heart { display: grid; width: 108px; height: 108px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 34px; background: rgba(255,255,255,.1); font-family: Georgia, serif; font-size: 64px; transform: rotate(5deg); }
.dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 19px; }
.dashboard-card { min-height: 165px; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.88); box-shadow: 0 8px 28px rgba(46,34,70,.05); }
.dashboard-card-head { display: flex; align-items: center; gap: 9px; color: #6d6576; font-size: 12px; }.dashboard-card-head > span { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 9px; color: var(--violet); background: #efeafd; font-size: 15px; }
.dashboard-content { display: flex; height: 91px; flex-direction: column; justify-content: center; margin-top: 9px; }.dashboard-content strong { display: block; overflow: hidden; color: var(--ink); font-family: Georgia, serif; font-size: 20px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }.dashboard-content span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.4; }.dashboard-content .dashboard-number { color: var(--violet); font-family: Georgia, serif; font-size: 36px; }
.quick-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 19px; padding: 16px 19px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.76); }.quick-actions p { margin: 0 auto 0 0; color: var(--muted); font-size: 12px; font-weight: 800; }.quick-actions button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; color: #6c6378; background: white; cursor: pointer; font-size: 11px; font-weight: 800; }.quick-actions button:hover { border-color: #cbbbec; color: var(--violet); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.note-card, .list-card { position: relative; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.86); box-shadow: 0 8px 30px rgba(46,34,70,.05); }
.note-card { display: flex; min-height: 210px; flex-direction: column; padding: 24px; overflow: hidden; }
.note-card::before { position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--accent, #a98ae9); content: ""; }
.note-card:nth-child(4n+2) { --accent: #e994ae; }.note-card:nth-child(4n+3) { --accent: #78b99e; }.note-card:nth-child(4n+4) { --accent: #e2af64; }
.note-card h2, .list-card h2 { margin: 0; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.note-content { display: -webkit-box; overflow: hidden; margin: 13px 0 22px; color: #696273; line-height: 1.6; white-space: pre-wrap; -webkit-line-clamp: 5; -webkit-box-orient: vertical; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; color: #9a94a1; font-size: 11px; }
.card-menu { display: flex; gap: 2px; }
.mini-button { border: 0; border-radius: 8px; padding: 6px 8px; color: #8d8695; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.mini-button:hover { color: var(--violet); background: #f3effb; }
.mini-button.danger:hover { color: #bd3a58; background: #fff0f3; }

.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; align-items: start; }
.list-card { padding: 23px; }
.list-card-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.list-card-head p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.list-items { display: grid; gap: 2px; margin: 15px 0; }
.list-item { display: grid; grid-template-columns: 25px 1fr 30px; gap: 8px; align-items: center; min-height: 38px; border-radius: 9px; }
.list-item:hover { background: var(--soft); }
.list-item input { width: 17px; height: 17px; accent-color: var(--violet); }
.list-item span { overflow-wrap: anywhere; color: #5f5968; font-size: 14px; }
.list-item.checked span { color: #a39da9; text-decoration: line-through; }
.list-add { display: flex; gap: 8px; padding-top: 4px; }
.list-add input { height: 40px; }.list-add button { width: 40px; flex: 0 0 auto; border: 0; border-radius: 10px; color: white; background: var(--violet); cursor: pointer; font-size: 20px; }

.gallery-grid { columns: 4 240px; column-gap: 16px; }
.image-card { position: relative; display: inline-block; overflow: hidden; width: 100%; margin: 0 0 16px; border-radius: 16px; background: white; box-shadow: 0 8px 28px rgba(47,35,71,.08); break-inside: avoid; }
.image-card img { display: block; width: 100%; height: auto; background: #ede9f1; }
.image-card-info { padding: 14px 15px 15px; }
.image-card-info p { margin: 0 0 8px; color: #5d5667; line-height: 1.45; }
.image-card-info .card-meta { margin: 0; }

.moments-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 21px; align-items: start; }
.moments-panel { padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.88); box-shadow: 0 10px 34px rgba(46,34,70,.06); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }.panel-heading .eyebrow { margin-bottom: 6px; }.panel-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 26px; font-weight: 500; }
.events-list, .capsules-list { display: grid; gap: 11px; margin-top: 18px; }
.event-item, .capsule-item { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.event-date { display: grid; width: 50px; height: 54px; flex: 0 0 auto; place-items: center; align-content: center; border-radius: 12px; color: var(--violet); background: white; box-shadow: 0 4px 13px rgba(53,39,78,.07); }.event-date strong, .event-date span { display: block; }.event-date strong { font-family: Georgia, serif; font-size: 20px; line-height: 1; }.event-date span { margin-top: 4px; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.moment-details { min-width: 0; flex: 1; }.moment-details strong, .moment-details span, .moment-details small { display: block; }.moment-details strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.moment-details span { margin-top: 4px; color: var(--violet); font-size: 10px; font-weight: 800; }.moment-details small { overflow: hidden; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.4; text-overflow: ellipsis; }
.capsule-icon { display: grid; width: 49px; height: 49px; flex: 0 0 auto; place-items: center; border-radius: 14px; color: white; background: linear-gradient(135deg, #7654d4, #de78a5); font-size: 21px; }.capsule-item.unlocked .capsule-icon { background: linear-gradient(135deg, #3b9873, #74c29f); }
.capsule-content { margin: 9px 0 0; padding: 11px; border-radius: 10px; color: #5f5869; background: white; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.mini-empty { margin-top: 18px; padding: 24px; border: 1px dashed #d9d2e2; border-radius: 13px; color: var(--muted); text-align: center; font-size: 12px; }

.reaction-bar { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.reaction-button { min-width: 31px; height: 27px; padding: 0 7px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.82); cursor: pointer; font-size: 13px; }.reaction-button:hover, .reaction-button.mine { border-color: #c9b6ef; background: #f0eafd; }.reaction-button small { margin-left: 3px; color: #776e80; font-size: 9px; }
.message-bubble .reaction-bar { justify-content: flex-end; margin: 7px -4px -3px; }.message:not(.mine) .message-bubble .reaction-bar { justify-content: flex-start; }.message-bubble .reaction-button { height: 24px; background: rgba(255,255,255,.9); }.message.mine .reaction-button.mine { background: white; }

.profile-layout { display: grid; grid-template-columns: minmax(480px, 1.35fr) minmax(300px, .65fr); gap: 22px; align-items: start; }
.profile-editor, .duo-card { border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.88); box-shadow: 0 10px 34px rgba(46,34,70,.06); }
.profile-editor { padding: 28px; }
.profile-photo-block { display: flex; align-items: center; gap: 22px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.profile-photo-block h2, .duo-card h2 { margin: 0; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.profile-photo-block p, .duo-card > p:not(.eyebrow) { margin: 7px 0 13px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.profile-avatar, .profile-list-avatar { display: grid; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 50%; color: white; background: linear-gradient(135deg, var(--violet), var(--pink)); font-weight: 900; }
.profile-avatar { width: 108px; height: 108px; font-size: 30px; box-shadow: 0 12px 28px rgba(119,83,214,.2); }
.profile-avatar img, .profile-list-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-actions { display: flex; align-items: center; gap: 12px; }
.file-button { display: inline-flex; min-height: 38px; align-items: center; padding: 0 13px; cursor: pointer; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.text-button { padding: 7px; border: 0; background: transparent; color: var(--violet); cursor: pointer; font-size: 12px; font-weight: 800; }
.text-button.danger { color: #b6415c; }
.profile-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 25px; }
.profile-form label:nth-child(3), .profile-form .form-error { grid-column: 1 / -1; }
.profile-form textarea { min-height: 110px; }
.profile-form button { justify-self: start; }
.profile-form-actions { display: flex; grid-column: 1 / -1; gap: 10px; align-items: center; }
.logout-secondary { color: #a53c55; }
.profile-form input:disabled { color: #8e8897; background: #f5f3f7; }
.duo-card { padding: 28px; }
.profiles-list { display: grid; gap: 12px; margin-top: 22px; }
.profile-list-item { display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.profile-list-avatar { width: 49px; height: 49px; font-size: 14px; }
.profile-list-item strong, .profile-list-item span, .profile-list-item small { display: block; }
.profile-list-item strong { font-size: 14px; }
.profile-list-item span { margin-top: 2px; color: #9b94a4; font-size: 10px; }
.profile-list-item small { margin-top: 6px; color: #716a7b; line-height: 1.4; }
.profile-placeholder { padding: 18px; border: 1px dashed #d8d0e2; border-radius: 14px; color: var(--muted); font-size: 13px; text-align: center; }

.chat-view { display: grid; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; height: calc(100vh - 210px); min-height: 460px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.85); box-shadow: 0 12px 35px rgba(46,34,70,.06); }
.messages { overflow-y: auto; padding: 28px; scrollbar-color: #d7cfe5 transparent; }
.message { display: flex; align-items: flex-end; gap: 9px; margin: 14px 0; }
.message.mine { flex-direction: row-reverse; }
.message-avatar { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: white; background: #aaa0b8; font-size: 11px; font-weight: 900; }
.message-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.message.mine .message-avatar { background: var(--violet); }
.message-bubble { max-width: min(620px, 72%); padding: 11px 14px 9px; border-radius: 15px 15px 15px 4px; background: #f1eef5; }
.message.mine .message-bubble { border-radius: 15px 15px 4px 15px; color: white; background: var(--violet); }
.message-bubble p { margin: 0; line-height: 1.48; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-bubble small { display: block; margin-top: 5px; color: #9991a3; font-size: 9px; }
.message.mine .message-bubble small { color: rgba(255,255,255,.66); text-align: right; }
.chat-form { display: grid; grid-template-columns: 1fr 46px; gap: 10px; align-items: end; padding: 15px; border-top: 1px solid var(--line); background: white; }
.chat-form textarea { min-height: 46px; max-height: 130px; resize: none; }
.send-button { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 13px; color: white; background: var(--violet); font-size: 17px; }

.empty-state { display: grid; min-height: 360px; place-items: center; align-content: center; padding: 40px; border: 1px dashed #dcd5e5; border-radius: 22px; color: var(--muted); text-align: center; }
.empty-state > span { display: grid; width: 54px; height: 54px; place-items: center; margin-bottom: 15px; border-radius: 18px; color: var(--violet); background: #eee9fb; font-size: 25px; }
.empty-state h2 { margin: 0; color: var(--ink); font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.empty-state p { margin: 9px 0 0; }

.modal { width: min(560px, calc(100% - 34px)); padding: 0; border: 0; border-radius: 22px; background: white; box-shadow: 0 28px 80px rgba(40,29,62,.28); }
.modal::backdrop { background: rgba(35,27,47,.42); backdrop-filter: blur(5px); }
.modal form { padding: 28px; }
.modal-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.dialog-fields { display: grid; gap: 17px; }
.check-label { display: flex; align-items: center; gap: 8px; cursor: pointer; }.check-label input { width: 17px; height: 17px; accent-color: var(--violet); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 23px; }
.file-drop { display: grid; min-height: 150px; place-items: center; padding: 20px; border: 1px dashed #cfc5dc; border-radius: 14px; background: var(--soft); color: var(--muted); text-align: center; cursor: pointer; }
.file-drop input { height: auto; border: 0; box-shadow: none; }

.toast { position: fixed; z-index: 20; right: 28px; bottom: 25px; max-width: 360px; padding: 13px 17px; border-radius: 12px; color: white; background: #302a3b; box-shadow: 0 14px 35px rgba(35,26,52,.25); opacity: 0; pointer-events: none; transform: translateY(14px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #a93652; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; width: min(620px, calc(100% - 40px)); gap: 42px; }
  .auth-intro { padding-top: 20px; }.auth-intro h1 { font-size: 53px; }
  .app-shell { grid-template-columns: 82px 1fr; }.sidebar { padding: 24px 14px; }
  .sidebar-brand > div:last-child, .nav-button:not(.active) { font-size: 0; }.sidebar-brand { justify-content: center; padding: 0; }
  .main-nav { justify-items: center; }.nav-button { width: 52px; justify-content: center; padding: 12px; font-size: 0; }.nav-button > span { font-size: 19px; }
  .sidebar-footer { justify-content: center; }.user-badge > div, .logout-label { display: none; }.logout-button { width: 40px; padding: 0; justify-self: center; }
  .workspace { padding-inline: 30px; }
  .gallery-grid { columns: 3 200px; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }.moments-layout { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .auth-shell { width: min(100% - 28px, 500px); padding: 35px 0; }.auth-intro h1 { font-size: 42px; }.auth-card { padding: 28px; }
  .app-shell { display: block; }.sidebar { position: fixed; z-index: 10; top: auto; right: 12px; bottom: 12px; left: 12px; width: auto; height: 64px; flex-direction: row; align-items: center; padding: 7px; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 36px rgba(42,31,61,.16); }
  .sidebar-brand, .sidebar-footer { display: none; }.main-nav { display: grid; width: 100%; grid-template-columns: repeat(7,1fr); gap: 2px; margin: 0; }.nav-button, .nav-button:not(.active) { width: 100%; padding: 10px 1px; font-size: 8px; gap: 1px; }.nav-button > span { width: 16px; font-size: 13px; }
  .workspace { padding: 28px 17px 98px; }.topbar { align-items: center; }.topbar h1 { font-size: 35px; }.topbar > div > p:last-child { display: none; }.topbar .eyebrow { margin-bottom: 5px; }
  .primary-button { padding: 0 13px; }.card-grid, .list-grid { grid-template-columns: 1fr; }.gallery-grid { columns: 2 145px; }.chat-view { height: calc(100vh - 170px); min-height: 380px; }.messages { padding: 17px; }.message-bubble { max-width: 84%; }
  .profile-editor, .duo-card { padding: 20px; }.profile-photo-block { align-items: flex-start; }.profile-avatar { width: 78px; height: 78px; }.profile-form { grid-template-columns: 1fr; }.profile-form label:nth-child(3), .profile-form .form-error, .profile-form-actions { grid-column: auto; }
  .welcome-card { min-height: 160px; padding: 26px; }.welcome-heart { display: none; }.welcome-card h2 { font-size: 28px; }.dashboard-grid { grid-template-columns: 1fr 1fr; }.quick-actions p { width: 100%; }
}
