.relationship-emblem {
  width: 28px;
  height: 21px;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
}
.brand { padding: 0 0 24px; gap: 8px; font-size: 15px; line-height: 1.35; }
.brand > a { min-width: 0; }
.brand > a span { display: block; }
.brand .philosophy .relationship-emblem { width: 64px; height: 48px; }
.philosophy { display: inline-flex; flex-shrink: 0; }
.emblem-trigger { padding: 0; display: flex; border-radius: 4px; }
.philosophy > .relationship-emblem { width: 76px; height: 57px; mix-blend-mode: multiply; }
.welcome-emblem { margin-bottom: 24px; }
.welcome-emblem .relationship-emblem { width: 116px; height: 87px; }
.poem-popover {
  position: fixed;
  inset: auto;
  margin: 0;
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  border: 1px solid #dce3df;
  border-radius: 8px;
  background: #fff;
  color: #35443d;
  box-shadow: 0 12px 40px #17271f24;
  text-align: left;
  font-weight: 400;
}
.poem-popover header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; position: sticky; top: -24px; margin: -24px -24px 20px; padding: 24px 24px 12px; background: #fff; z-index: 1; border-bottom: 1px solid #eef1ef; }
.poem-popover h2 { font-family: Georgia, serif; font-size: 23px; margin-bottom: 6px; }
.poem-popover header p { font-size: 11px; color: #6d7771; margin-bottom: 0; }
.poem-popover .poem-verses p { font-family: Georgia, serif; font-size: 15px; line-height: 1.8; margin-bottom: 20px; }
.poem-popover footer { border-top: 1px solid #e5eae7; padding-top: 14px; font-size: 11px; color: #65796c; }
.poem-popover footer a { text-decoration: underline; text-underline-offset: 3px; }
.poem-close { margin: -8px -10px 0 0; }
.connection-status { padding: 10px 20px; background: #fff4db; color: #674e17; font-size: 12px; line-height: 1.5; }
.connection-status[hidden] { display: none; }
.conversation-row { position:relative; display:flex; align-items:center; --conversation-action-bg:#f3f5f3; }
.conversation-row:has(.conversation-link.selected) { --conversation-action-bg:#e2eae4; }
.conversation-row:hover { --conversation-action-bg:#e8eee9; }
.conversation-row .conversation-link { flex:1; min-width:0; }
.conversation-delete, .conversation-invite { position:absolute; top:calc(50% - 2.5px); transform:translateY(-50%); z-index:1; color:#69796e; background:var(--conversation-action-bg); box-shadow:0 0 0 2px var(--conversation-action-bg); }
.conversation-delete { right:4px; }
.conversation-invite { right:40px; }
.conversation-delete:hover { color:#a13737; background:#fff0ed; }
@media (hover: hover) and (pointer: fine) {
  .conversation-delete, .conversation-invite { opacity:0; pointer-events:none; }
  .conversation-row:hover .conversation-delete,
  .conversation-row:focus-within .conversation-delete,
  .conversation-row:hover .conversation-invite,
  .conversation-row:focus-within .conversation-invite { opacity:1; pointer-events:auto; }
}
.deletion-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:20px; }
.flash-dismiss { margin-left: 12px; padding: 2px 6px; font-size: 20px; line-height: 1; }
@media (prefers-reduced-motion: no-preference) {
  .poem-popover:popover-open { animation: poem-fade-in 240ms ease-out; }
  @keyframes poem-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}
@media (max-width: 760px) {
  .sidebar-close { position: absolute; top: 2px; right: 2px; }
  .poem-popover { padding: 20px; }
  .poem-popover header { top: -20px; margin: -20px -20px 20px; padding: 20px 20px 12px; }
  .poem-popover .poem-verses p { font-size: 14px; }
}

/* Closed beta, consent and operator views. */
.beta-page { min-height:100dvh; padding:28px max(24px,calc((100vw - 1040px)/2)) 72px; background:#f7f8f3; }
.beta-page h1 { font-family:Georgia,serif; font-weight:400; font-size:42px; letter-spacing:-1px; }
.beta-nav { display:flex; justify-content:space-between; gap:20px; padding-bottom:44px; font-weight:600; }
.beta-nav > div { display:flex; flex-wrap:wrap; align-items:center; gap:20px; font-weight:400; }
.beta-hero { max-width:700px; margin:35px auto 0; text-align:center; }
.beta-hero > img { object-fit:cover; object-position:top; mix-blend-mode:multiply; margin-bottom:28px; }
.beta-hero h1 { font-size:clamp(36px,5vw,58px); line-height:1.15; }
.beta-lead { font-size:17px; line-height:1.7; color:#536258; }
.beta-hero .button { display:inline-flex; margin:16px 0; padding:14px 28px; }
.beta-quote { margin:48px 0 28px; padding:32px 20px; border-top:1px solid #d9e0d5; border-bottom:1px solid #d9e0d5; }
.beta-quote blockquote { font:italic 24px/1.6 Georgia,serif; margin:0 0 18px; color:#425f4b; }
.beta-quote figcaption,.beta-fine { font-size:12px; color:#657565; line-height:1.7; }
.beta-page a:not(.button):hover { text-decoration:underline; }
.beta-card { padding:28px; margin:24px 0; background:#fff; border:1px solid #dde4d9; border-radius:16px; }
.beta-card h2 { font-size:21px; font-weight:500; }
.beta-prose { max-width:760px; margin:0 auto; line-height:1.8; }
.beta-prose h2 { margin-top:28px; }
.beta-prose a,.beta-check a { text-decoration:underline; }
.beta-notice { padding:15px; background:#fff4d9; border-radius:8px; }
.beta-controls { display:flex; flex-wrap:wrap; gap:16px; align-items:end; margin:20px 0; }
.beta-form label,.beta-controls label { display:flex; flex-direction:column; gap:8px; margin-bottom:12px; }
.beta-page input:not([type=checkbox]),.beta-page select,.beta-page textarea,.beta-form textarea,.beta-form select { padding:10px 12px; border:1px solid #bccabb; border-radius:6px; background:#fff; color:#25312c; font:inherit; max-width:100%; }
.beta-form textarea { width:100%; }
.beta-check,.beta-form .beta-check { display:flex; flex-direction:row; align-items:flex-start; gap:12px; line-height:1.6; margin:20px 0; }
.beta-check input { margin-top:5px; flex-shrink:0; }
.beta-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:28px 0; }
.beta-stats section { background:#eaf0e6; border-radius:12px; padding:20px; }
.beta-stats span { font-size:12px; color:#526851; display:block; margin-bottom:12px; }
.beta-stats strong { font-size:23px; font-weight:500; overflow-wrap:anywhere; }
.beta-table { overflow:auto; max-height:520px; }
.beta-table th { position:sticky; top:0; background:#fff; z-index:1; }
.beta-table table { width:100%; text-align:left; border-collapse:collapse; font-size:13px; }
.beta-table th,.beta-table td { padding:13px 10px; border-bottom:1px solid #e3e8df; vertical-align:top; }
.beta-table small { display:block; color:#657565; margin-top:5px; }
.beta-access { padding:0; list-style:none; }
.beta-access li { display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; border-top:1px solid #e3e8df; padding:12px 0; overflow-wrap:anywhere; }
.beta-review { padding:24px; background:#f5f7f1; border-radius:10px; margin-top:20px; }
.beta-preserve { white-space:pre-wrap; overflow-wrap:anywhere; display:block; line-height:1.65; }
.beta-excerpt { margin:12px 0; padding:12px; border-left:3px solid #c2d5b8; background:#f7f9f4; }
.beta-excerpt small { color:#657565; }
.beta-message-picker { max-height:420px; overflow:auto; margin:20px 0; }
.beta-audit { font-size:12px; overflow-wrap:anywhere; line-height:1.8; }
@media(max-width:700px) { .beta-page {padding:20px 16px 40px;} .beta-nav {flex-direction:column; gap:16px; padding-bottom:28px;} .beta-card {padding:20px 16px;} .beta-stats {grid-template-columns:repeat(2,minmax(0,1fr));} .beta-stats strong {font-size:19px;} .beta-quote blockquote {font-size:21px;} .beta-controls label {width:100%;} }

.footer-memory { font-size:11px; margin-left:auto; }
.sidebar-bottom > a.text-button { display:block; width:fit-content; }
.sidebar-conversation-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding-bottom:12px; }

/* Desktop sidebar and an animated mobile drawer, without a reserved rail. */
.sidebar { order:0; border-left:0; border-right:1px solid #e3e8e4; }
.sidebar-content { display:flex; flex-direction:column; flex:1; min-height:0; }
.header-brand { display:flex; align-items:center; gap:8px; min-width:0; color:inherit; font-size:13px; font-weight:600; line-height:16px; }
.header-brand .relationship-emblem { width:36px; height:27px; mix-blend-mode:multiply; }
.mobile-chat-header > .icon-button { flex-shrink:0; }
.mobile-chat-header { display:none; background:#f3f5f3; border-bottom:1px solid #e3e8e4; }
@media (max-width:760px) {
  .mobile-chat-header { display:flex; flex-shrink:0; align-items:center; gap:8px; height:48px; min-height:48px; padding:4px 12px; }
  .sidebar { display:flex; position:fixed; inset:0 auto 0 0; z-index:15; width:min(300px,100vw); padding:48px 18px 18px; transform:translateX(calc(-100% - 1px)); visibility:hidden; pointer-events:none; box-shadow:none; }
  .sidebar.visible { inset:0 auto 0 0; width:min(300px,100vw); transform:translateX(0); visibility:visible; pointer-events:auto; box-shadow:10px 0 40px #0002; }
  .sidebar .sidebar-close { top:8px; left:12px; right:auto; }
  .sidebar ~ .main-area { margin-left:0; width:100%; }
}
@media (max-width:760px) and (prefers-reduced-motion:no-preference) {
  .sidebar { transition:transform 220ms ease, visibility 0s linear 220ms; }
  .sidebar.visible { transition-delay:0s; }
}

.workspace > .sidebar { position:relative; width:var(--sidebar-width, 248px); }
.sidebar-resize { position:absolute; top:0; bottom:0; right:-3px; width:7px; cursor:col-resize; touch-action:none; z-index:16; }
.sidebar-resize:hover, .sidebar-resize:focus-visible { background:#71958055; outline:0; }
.conversation-invite:hover { color:#286349; background:#e8eee9; }
.conversation-link .conversation-label { display:block; min-width:0; white-space:normal; overflow-wrap:anywhere; }
.conversation-link .conversation-label > span { white-space:normal; overflow:visible; text-overflow:clip; }
.conversation-person { display:flex; align-items:center; gap:6px; font-weight:600; }
.conversation-person-name { min-width:0; overflow-wrap:anywhere; }
.conversation-person .dot { flex-shrink:0; }
@media (max-width:760px) {
  .workspace > .sidebar { position:fixed; width:min(var(--sidebar-width, 300px), calc(100vw - 16px)); }
}
