:root {
  --ink: #252b2b;
  --muted: #77807e;
  --line: #e5e7e1;
  --paper: #fbfbf7;
  --cream: #f2f2e9;
  --sage: #dce7dc;
  --sage-deep: #39635c;
  --coral: #ee806a;
  --white: #ffffff;
}
* { box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100%; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--cream); font-family: Manrope, sans-serif; }
button, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 266px minmax(420px, 1fr) 310px; background: var(--paper); }
.sidebar { padding: 30px 18px 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: #f8f8f2; }
.brand, .mobile-brand { display: flex; align-items: center; gap: 9px; font-family: Fraunces, serif; font-size: 22px; font-weight: 600; letter-spacing: 0; }
.brand-mark { width: 28px; height: 28px; display: inline-grid; place-items: center; background: var(--coral); color: white; border-radius: 50%; font-family: Fraunces, serif; font-size: 17px; }
.new-chat { margin: 37px 0 29px; border: 0; padding: 12px 14px; display: flex; gap: 9px; align-items: center; justify-content: center; color: white; border-radius: 7px; background: var(--sage-deep); font-weight: 600; font-size: 13px; }
.new-chat span { font-size: 20px; font-weight: 400; line-height: 12px; }
.companion-card { position: relative; display: flex; gap: 11px; align-items: center; padding: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 7px; }
.companion-card img { width: 38px; height: 38px; object-fit: cover; border-radius: 50%; }
.eyebrow { margin: 0 0 5px; color: var(--muted); font: 500 10px "DM Mono", monospace; letter-spacing: 1px; }
.companion-card strong { display: block; font-size: 13px; }.online-dot { color: var(--sage-deep); font-size: 11px; }.online-dot::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: #78a896; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink); font-family: "DM Mono", monospace; font-size: 16px; }.icon-button:hover { background: var(--cream); }.small { position: absolute; right: 8px; top: 13px; width: 26px; height: 26px; border: 0; font-size: 13px; }
.sidebar-nav { margin-top: 32px; }.history-item { width: 100%; margin: 2px 0; padding: 10px 9px; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 5px; color: #59605f; text-align: left; background: transparent; font-size: 12px; }.history-item.active, .history-item:hover { color: var(--ink); background: #e8ebe4; }.history-symbol { color: #a5aaa5; }
.sidebar-footer { margin-top: auto; }.settings-button { width: 100%; padding: 10px 9px; display: flex; justify-content: space-between; border: 0; color: #59605f; background: transparent; font-size: 12px; }.settings-key { color: #a6aba5; font: 10px "DM Mono", monospace; }.privacy-note { margin: 16px 8px 0; color: #929995; font-size: 10px; }.lock { color: var(--sage-deep); margin-right: 5px; }
.account-row { margin-bottom: 6px; padding: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 6px; background: var(--white); border: 1px solid var(--line); }.account-row span { overflow: hidden; color: #59605f; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.account-row .settings-button { width: auto; padding: 4px 8px; color: var(--coral); }
.auth-overlay { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(37, 43, 43, 0.55); }.auth-overlay[hidden] { display: none; }.auth-card { width: min(340px, 100%); max-height: 90vh; overflow-y: auto; padding: 28px 26px; border-radius: 10px; background: var(--paper); box-shadow: 0 20px 60px rgba(20, 30, 20, .25); }.auth-card .brand { justify-content: center; margin-bottom: 20px; }.auth-tabs { display: flex; gap: 4px; margin-bottom: 18px; padding: 3px; border-radius: 7px; background: var(--cream); }.auth-tab { flex: 1; padding: 8px; border: 0; border-radius: 5px; color: #6b736f; background: transparent; font-size: 12px; font-weight: 600; }.auth-tab.active { color: var(--ink); background: var(--white); }.auth-label { display: block; margin-bottom: 12px; color: #59605f; font-size: 11px; font-weight: 600; }.auth-label input { width: 100%; margin-top: 5px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--white); font: 13px Manrope, sans-serif; }.auth-error { margin: 0 0 12px; color: var(--coral); font-size: 11px; }.auth-error[hidden] { display: none; }.auth-submit { width: 100%; margin: 4px 0 0; }
.chat-panel { min-width: 0; display: flex; flex-direction: column; height: 100vh; background: var(--paper); }.chat-header { height: 74px; padding: 0 31px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }.header-person { display: flex; align-items: center; gap: 10px; }.header-person img { width: 36px; height: 36px; object-fit: cover; border-radius: 50%; }.header-person strong, .header-person span { display: block; }.header-person strong { font-size: 13px; }.header-person span { margin-top: 1px; color: var(--sage-deep); font-size: 10px; }.header-actions { display: flex; gap: 7px; }.mobile-brand { display: none; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 35px max(32px, 9%) 10px; }.date-label { display: flex; align-items: center; gap: 12px; margin: 0 0 29px; color: #a1a6a1; font: 10px "DM Mono", monospace; text-align: center; }.date-label::before, .date-label::after { content: ""; height: 1px; flex: 1; background: var(--line); }.message-group { max-width: 590px; display: flex; gap: 10px; margin: 0 0 24px; }.user-message { margin-left: auto; flex-direction: row-reverse; }.message-avatar { flex: 0 0 auto; width: 29px; height: 29px; object-fit: cover; border-radius: 50%; }.sender-line { margin-bottom: 6px; font-size: 11px; }.sender-line strong { margin-right: 7px; }.sender-line span { color: #9da3a0; font-size: 10px; }.bubble { padding: 12px 14px; border-radius: 5px; font-size: 13px; line-height: 1.65; }.bubble-mira { background: var(--sage); }.bubble-user { background: #f2e1d8; }.user-message .sender-line { text-align: right; }
.suggestions { padding: 5px max(32px, 9%) 14px; display: flex; gap: 8px; overflow-x: auto; }.suggestions button { flex: 0 0 auto; padding: 7px 10px; border: 1px solid #dce1d9; border-radius: 14px; color: #596460; background: transparent; font-size: 10px; }.suggestions button:hover { border-color: var(--sage-deep); color: var(--sage-deep); }
.suggestions[hidden] { display: none; }
.composer { margin: 0 max(32px, 9%); padding: 6px; display: flex; align-items: center; gap: 7px; border: 1px solid #d9ded7; border-radius: 8px; background: var(--white); box-shadow: 0 5px 15px rgba(45, 57, 49, .05); }.attach { border: 0; font-size: 20px; }.composer textarea { min-height: 28px; max-height: 110px; flex: 1; resize: none; border: 0; outline: 0; padding: 6px 2px; color: var(--ink); background: transparent; font-size: 13px; line-height: 1.45; }.composer textarea::placeholder { color: #a9aeaa; }.send-button { flex: 0 0 auto; width: 34px; height: 34px; border: 0; border-radius: 6px; background: var(--sage-deep); color: white; font-size: 20px; line-height: 1; }.send-button:disabled { opacity: .45; }.disclaimer { margin: 10px 0 13px; text-align: center; color: #a0a6a1; font-size: 9px; }
.details-panel { position: relative; padding: 36px 32px; border-left: 1px solid var(--line); background: #f8f8f2; }.close-details { display: none; }.profile-image { width: 84px; height: 84px; object-fit: cover; border-radius: 50%; display: block; margin: 12px auto 16px; }.details-panel h1 { margin: 0; text-align: center; font: 600 25px Fraunces, serif; }.profile-subtitle { margin: 4px 0 12px; color: #777f7b; text-align: center; font-size: 11px; }.status-line { display: flex; justify-content: center; align-items: center; gap: 5px; margin-bottom: 34px; color: var(--sage-deep); font-size: 10px; }.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #78a896; }.profile-section { padding: 19px 0; border-top: 1px solid var(--line); }.profile-section > p:not(.eyebrow) { margin: 0; color: #58615e; font-size: 11px; line-height: 1.75; }.connection-stat { display: flex; justify-content: space-between; color: #65706c; font-size: 11px; }.connection-stat strong { color: var(--ink); }.connection-bar { height: 5px; margin: 10px 0 7px; overflow: hidden; border-radius: 3px; background: #e2e6df; }.connection-bar span { display: block; width: 42%; height: 100%; background: var(--coral); }.connection-caption { margin: 0; color: #959c97; font-size: 10px; }.outline-button { width: 100%; margin-top: 7px; padding: 10px; border: 1px solid #cad4ca; border-radius: 6px; color: var(--sage-deep); background: transparent; font-size: 11px; font-weight: 600; }
.personality-input { width: 100%; margin: 2px 0 10px; padding: 9px 10px; resize: vertical; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--white); font: 11px/1.5 Manrope, sans-serif; }.personality-input::placeholder { color: #a5aba6; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 5; transform: translate(-50%, 80px); padding: 10px 14px; border-radius: 5px; color: white; background: var(--ink); opacity: 0; font-size: 12px; transition: opacity .2s, transform .2s; }.toast.show { transform: translate(-50%, 0); opacity: 1; }
@media (max-width: 1080px) { .app-shell { grid-template-columns: 230px minmax(420px, 1fr); }.details-panel { position: fixed; z-index: 4; top: 0; right: 0; bottom: 0; width: 310px; overflow-y: auto; transform: translateX(100%); transition: transform .25s; box-shadow: -10px 0 30px rgba(20,30,20,.08); }.details-panel.open { transform: translateX(0); }.close-details { display: block; position: absolute; top: 16px; right: 18px; border: 0; background: none; color: var(--muted); font-size: 22px; } }
@media (max-width: 720px) { .app-shell { display: block; }.sidebar { display: none; }.chat-panel { height: 100dvh; }.chat-header { height: 64px; padding: 0 16px; }.header-person { display: none; }.mobile-brand { display: flex; font-size: 20px; }.chat-scroll { padding: 28px 16px 8px; }.message-group { max-width: 91%; }.suggestions { padding: 5px 16px 12px; }.composer { margin: 0 16px; }.disclaimer { padding: 0 16px; font-size: 8px; }.details-panel { width: min(310px, 92vw); }.composer textarea, .auth-label input, .personality-input { font-size: 16px; } }
@media (max-width: 380px) { .composer { gap: 4px; padding: 4px; }.send-button, .attach { width: 30px; height: 30px; }.auth-card { padding: 22px 18px; } }
