/* Approved conversation-inspired identity, shared Colour + Paper roles. */
.phone.reference-design{background:var(--balu-paper)}
.companion-header{position:relative;z-index:10;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:20px 16px 15px;flex:0 0 auto;min-height:90px;box-sizing:border-box;background:var(--balu-paper)}
.companion-header-left{display:flex;align-items:center;gap:10px;min-width:0}.avatar-ring{width:60px;height:60px;flex:0 0 60px;border-radius:50%;padding:3px;background:linear-gradient(145deg,var(--balu-primary),#b7bea3,var(--balu-secondary));box-sizing:border-box}.avatar-ring img{display:block;width:100%!important;height:100%!important;object-fit:contain;background:var(--balu-surface);border-radius:50%;padding:3px;box-sizing:border-box;transform:none!important;animation:none!important}.companion-name{min-width:0}.companion-name strong{display:block;font-size:20px;font-weight:500;color:var(--balu-primary);line-height:1.25}.companion-name small{display:block;max-width:86px;font-size:10px;line-height:1.3;color:var(--balu-muted);margin-top:4px}.companion-header-actions{display:flex;gap:7px;flex-shrink:0}.phone .companion-header-actions .round{height:42px;width:42px;min-width:42px;min-height:42px;border:1px solid #ffffffb3;border-radius:50%;background:var(--balu-surface);box-shadow:0 3px 8px #304b400a;color:var(--balu-primary);padding:10px}.companion-header-actions .icon{height:21px;width:21px}
.header-dropdown{position:absolute;right:16px;top:86px;width:242px;padding:12px;background:var(--balu-surface);border:1px solid var(--balu-border);border-radius:24px;box-shadow:0 12px 30px #304b401b;z-index:30}.header-menu-row{display:flex;align-items:center;gap:13px;width:100%;padding:14px 10px;min-height:50px;color:var(--balu-ink);text-align:left;font:400 14px var(--balu-font);border:0;background:none;border-radius:12px}.header-menu-row:hover,.header-menu-row:focus-visible{background:var(--balu-sage)}.header-menu-row .icon{width:22px;height:22px;flex-shrink:0}
.phone .home-content{padding:0 16px 22px}.discovery-heading{margin:14px 3px 16px}.discovery-heading h2{font-size:17px}.discovery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.bento-column{display:flex;flex-direction:column;gap:14px;min-width:0}.phone .discovery-tile{display:block;width:100%;padding:0 0 13px;border-radius:25px;border:1px solid #ffffffd1;box-shadow:0 5px 14px #5046310b;background:var(--balu-surface);overflow:hidden}.phone .discovery-art{height:150px;background:linear-gradient(150deg,#f0dfb8,var(--balu-surface));position:relative;mask-image:linear-gradient(#000 70%,transparent 100%);-webkit-mask-image:linear-gradient(#000 70%,transparent 100%)}.phone .discovery-creator .discovery-art{height:115px;background:linear-gradient(150deg,#efd4c5,var(--balu-surface))}.phone .discovery-household .discovery-art{height:110px;background:linear-gradient(150deg,#dfe7d1,var(--balu-surface))}.phone .discovery-more{margin-top:0}.phone .discovery-more .discovery-art{height:150px;background:linear-gradient(140deg,#dce8e7,#eee0c6,var(--balu-surface))}.discovery-art .ink-illustration{width:100%;height:100%;aspect-ratio:auto;mix-blend-mode:multiply;background-image:url('/assets/expert-color-cutouts.webp');background-size:300% 100%}.discovery-caption{display:flex;align-items:center;gap:7px;padding:0 11px;margin-top:-7px;position:relative}.discovery-caption>div{flex:1;min-width:0}.phone .discovery-caption strong{padding:0;font-size:15px;font-weight:500;line-height:1.4}.discovery-caption small{display:block;font-size:10px;line-height:1.5;color:var(--balu-muted);margin-top:5px}.card-arrow{display:grid!important;place-items:center;border-radius:50%;width:28px;height:28px;flex:0 0 28px;background:#e7eade;color:var(--balu-primary);padding:0!important;margin:0!important}.card-arrow .icon{width:15px;height:15px}.discovery-more .more-art{padding:25px 12px}.discovery-more .more-art .icon{width:30px;height:30px}
.phone .attachment-tray{position:absolute;bottom:100%;left:10px;right:10px;top:auto;width:auto;display:flex;justify-content:space-between;gap:6px;padding:22px 6px 12px;border:0;border-radius:24px 24px 0 0;background:linear-gradient(transparent,var(--balu-paper) 22%);box-shadow:none;z-index:15}.phone .attachment-tray[hidden]{display:none}.attachment-choice{display:flex;flex-direction:column;align-items:center;gap:8px;background:none;border:0;color:var(--balu-ink);font:400 12px var(--balu-font);flex:1;min-width:0;padding:0 0 5px}.attachment-orb{width:60px;height:60px;display:grid;place-items:center;background:#fcf9f2bd;border:1px solid white;border-radius:50%}.attachment-orb .icon{height:28px;width:28px}.phone .composer-wrap{position:relative;z-index:11}
.phone.reference-design .sheet.full-page{height:100%;max-height:100%;width:100%;border-radius:0;margin:0;padding:24px 22px;box-sizing:border-box;background:var(--balu-paper);overflow:auto;box-shadow:none;animation:none}.phone:has(.full-page)>.modal-backdrop{padding:0;align-items:stretch;background:var(--balu-paper);backdrop-filter:none}.full-page .sheet-head{align-items:center;gap:10px;margin-bottom:26px}.full-page .sheet-head h2{font-size:20px;flex:1}.full-page .sheet-head .round{width:40px;height:40px;min-width:40px;font-size:25px}.full-page .sheet-head .icon{width:21px;height:21px}.full-page .thread-tile{border-radius:25px;padding:20px;margin-bottom:16px;gap:12px}.full-page .thread-tile:has(.update-badge){background:linear-gradient(140deg,#e7eddc,var(--balu-surface) 55%)}.work-preview{border-top:1px solid var(--balu-border);padding-top:15px;font-size:13px!important;line-height:1.7!important}.work-reply{display:flex;justify-content:space-between;align-items:center;font-size:12px;border:1px solid var(--balu-border);padding:12px;border-radius:25px;color:var(--balu-muted);background:var(--balu-surface)}.work-reply .icon{width:17px;height:17px}.full-page .thread-tile:not(:has(.update-badge)) .thread-state{display:none}.work-library{display:block;margin:20px auto}
.page-top{display:flex;align-items:center;gap:20px;margin-bottom:28px}.page-top h2{font-size:20px;font-weight:500}.page-top .round{background:var(--balu-surface);border:0}.contact-page{display:flex;flex-direction:column}.contact-card{display:flex;flex-direction:column;background:var(--balu-surface);border:1px solid white;border-radius:28px;flex:1;min-height:260px;overflow:hidden}.contact-card h3{font-size:17px;line-height:1.5;padding:24px 22px;margin:0;text-align:center;background:#eae6d966;font-weight:500}.contact-card textarea{width:100%;flex:1;min-height:200px;resize:none;box-sizing:border-box;padding:24px;border:0;outline-offset:-4px;background:var(--balu-surface);font:400 18px/1.6 var(--balu-font);color:var(--balu-ink)}.contact-card textarea::placeholder{color:#737969}.contact-footer{display:flex;justify-content:flex-end;padding:18px}.contact-footer .primary{min-width:135px;border-radius:30px}.contact-card>p{padding:20px;text-align:center}.contact-card>.primary{margin:20px}
.phone .feature-emblem>img{width:135px;height:145px}.being-landing{width:100%;height:100%;object-fit:contain}
@media(max-width:350px){.companion-header{padding:15px 12px;gap:5px}.avatar-ring{width:49px;height:49px;flex-basis:49px}.companion-header-left{gap:7px}.companion-name strong{font-size:17px}.companion-header-actions{gap:3px}.phone .companion-header-actions .round{width:40px;min-width:40px;height:42px;padding:9px}.phone .discovery-caption strong{font-size:13px}.discovery-caption{padding-inline:9px;gap:4px}.card-arrow{width:24px;height:24px;flex-basis:24px}.attachment-orb{width:52px;height:52px}.header-dropdown{right:12px;top:77px}}



.active-stack .thread-tile .work-preview,.active-stack .thread-tile .work-reply,.active-stack .thread-tile .thread-state{display:none}.active-stack .thread-tile{min-height:100px;padding-bottom:25px}.phone .contact-footer .primary{width:135px;min-width:135px;margin:0}

/* Shared editorial scene cards. Header/portrait gradient intentionally unchanged. */
.phone .card-arrow{background:var(--balu-primary);color:#F5E7C8}
.phone .discovery-art .scene-illustration{display:block;width:100%;height:100%;object-fit:cover;object-position:center 35%;background:none;mix-blend-mode:normal;transform:none;border:0;border-radius:0}
.phone .discovery-more .more-art{padding:0}.phone .discovery-art{background:var(--balu-surface)}
.phone .more-screen{display:flex;flex-direction:column;height:100%;background:var(--balu-paper)}
.more-page-heading{flex-shrink:0;padding:22px 18px 12px}.more-page-heading .round{background:var(--balu-surface);border:1px solid white;width:42px;height:42px;color:var(--balu-primary)}.more-page-heading h1{font:500 28px/1.2 var(--balu-font);margin:20px 0 10px;color:var(--balu-primary)}
.more-page-scroll{flex:1;min-height:0;overflow:auto;padding:0 14px 24px}.more-page-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 9px;align-items:stretch}.phone .more-topic-card{border-radius:22px;min-width:0;padding-bottom:12px;display:flex;flex-direction:column}.phone .more-topic-card .discovery-art{height:112px;flex-shrink:0;width:100%;background:var(--balu-surface)}.more-topic-card .discovery-caption{padding:0 9px;gap:7px;flex:1;display:flex;flex-direction:column;align-items:flex-start;width:100%}.phone .more-topic-card strong{font-size:13px;line-height:1.45;text-align:left;display:block;overflow-wrap:anywhere}.more-topic-card .discovery-caption>div{width:100%}.phone .more-topic-card .card-arrow{width:25px;height:25px;flex-basis:25px;align-self:flex-end}.more-topic-card small{font-size:9px}.phone .feature-emblem>img.feature-scene{width:180px;height:170px;object-fit:cover;border-radius:22px;mask-image:linear-gradient(#000 70%,transparent)}
@media(max-width:350px){.more-page-scroll{padding-inline:10px}.more-page-grid{gap:11px 7px}.phone .more-topic-card .discovery-art{height:95px}.phone .more-topic-card strong{font-size:12px}.more-topic-card .discovery-caption{padding-inline:7px}}
.phone .discovery-more .more-art{display:block;grid-template-columns:none}

/* Six equal capability cards, shared cream controls. Founder revision 29 September. */
.phone .six-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,172px);gap:12px}
.phone .six-card-grid .discovery-tile{height:100%;min-width:0;padding:0;display:flex;flex-direction:column;border-radius:22px}
.phone .six-card-grid .discovery-art{height:60%;flex:0 0 60%;width:100%;background:var(--balu-surface)}
.phone .six-card-grid .discovery-caption{flex:1;min-height:0;margin-top:0;padding:6px 8px 6px;display:grid;grid-template-columns:minmax(0,1fr) 25px;grid-template-rows:auto 1fr;column-gap:6px;row-gap:5px;align-items:start;text-align:left;width:100%}
.phone .six-card-grid .discovery-caption>div{display:contents}
.phone .six-card-grid .discovery-caption strong{grid-column:1 / -1;grid-row:1;font-size:13px;line-height:1.35;display:block;white-space:nowrap;overflow-wrap:normal}
.phone .six-card-grid .discovery-caption small{grid-column:1;grid-row:2;font-size:10px;line-height:1.35;margin:0;align-self:start}
.phone .six-card-grid .card-arrow{grid-column:2;grid-row:2;width:25px;height:25px;flex-basis:25px;align-self:start}
.phone.reference-design .composer-wrap{background:var(--balu-paper);padding:10px 12px max(14px,env(safe-area-inset-bottom));border:0}
.phone.reference-design .composer{background:var(--balu-surface);border:1px solid #fffdf8;border-radius:30px;padding:6px;gap:5px;box-shadow:0 3px 14px #304b4009}
.phone.reference-design .composer input{background:transparent;color:var(--balu-ink);font:400 15px var(--balu-font);padding:0 4px;min-width:0}
.phone.reference-design .composer input::placeholder{color:var(--balu-muted);opacity:.85;font-size:clamp(12px,3.5vw,14px)}
.phone.reference-design .composer :is(.attach,.composer-voice){background:var(--balu-surface);color:var(--balu-primary);border:0;box-shadow:none;width:42px;height:44px;min-width:42px;min-height:44px}
.phone.reference-design .composer .composer-voice,.phone.reference-design .composer .send{background:var(--balu-primary);color:var(--balu-cream);border:0;box-shadow:none;width:44px;height:44px;min-width:44px;min-height:44px}
.phone.reference-design :is(.primary,.hello-button){background:var(--balu-primary);color:var(--balu-cream)}
.phone.reference-design .sheet{background:var(--balu-surface)}
.phone.reference-design .feature-sheet{background:var(--balu-surface)!important}
.phone.reference-design .feature-emblem{width:100%;height:190px;margin:4px auto 10px}
.phone.reference-design .feature-emblem>img.feature-scene{width:260px;height:190px;object-fit:cover;object-position:center 42%;border-radius:20px}
.phone.reference-design .intro-voice{background:var(--balu-paper);border:0;padding:12px;margin:14px 0 18px;border-radius:20px}
.phone.reference-design .intro-audio-row{display:flex;gap:12px;width:100%}
.phone.reference-design .intro-audio-row .intro-toggle{background:var(--balu-primary);color:var(--balu-cream);border:0;flex:0 0 44px;width:44px;height:44px}
.phone.reference-design .intro-audio-row .wave{display:flex;flex:1;min-width:0;max-width:none;width:auto;justify-content:space-between;gap:3px;align-items:center}
.phone.reference-design .intro-voice .wave i{background:var(--balu-primary);flex:1;max-width:4px;border-radius:4px}
.phone.reference-design :is(.text-field,.phone-input){background:var(--balu-paper);border:1px solid var(--balu-border);color:var(--balu-ink)}
.phone .attachment-orb{background:var(--balu-surface);color:var(--balu-primary)}
.phone .card-arrow{color:var(--balu-cream)}
@media(max-width:350px){.phone .six-card-grid{grid-template-rows:repeat(3,180px);gap:10px}.phone .six-card-grid .discovery-caption{padding-inline:7px}.phone .six-card-grid .discovery-caption strong{font-size:12px}.phone.reference-design .composer input{font-size:14px}}

/* One sage user surface; timestamp sits on the conversation background. */
.phone.reference-design .conversation-screen .user-message{background:transparent;padding:0;box-shadow:none;border:0}
.phone.reference-design .conversation-screen .user-message>.bubble{background:var(--balu-sage);padding:12px 16px;border:0}

/* MVP: one conversation, discovery in the header, quiet work status. */
.companion-avatar{position:relative;flex:0 0 auto}
.companion-working{display:block;position:absolute;top:calc(100% + 3px);left:50%;transform:translateX(-50%);font-size:10px;line-height:1.3;white-space:nowrap;color:var(--balu-muted)}
.companion-header.is-working{padding-bottom:25px}
.companion-header.has-conversation{padding-inline:12px;gap:6px}
.has-conversation .companion-header-left{gap:8px}
.has-conversation .companion-header-actions{gap:4px}
.phone .header-topics{display:flex;align-items:center;gap:3px;min-height:30px;padding:4px 0 0;background:none;border:0;border-radius:0;color:var(--balu-primary);font:400 10px/1.3 var(--balu-font);white-space:nowrap;text-align:left}
.header-topics>span:first-of-type{text-decoration:underline;text-underline-offset:3px}
.header-topics .icon{width:12px;height:12px}
.header-topics.topics-enter{animation:topics-settle .25s ease-out both}
@keyframes topics-settle{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:350px){.companion-header.has-conversation{padding-inline:10px;gap:4px}.has-conversation .companion-header-left{gap:7px}.has-conversation .companion-header-actions{gap:3px}.phone .header-topics{font-size:9px;gap:2px}.header-topics .icon{width:11px;height:11px}}
@media(prefers-reduced-motion:reduce){.header-topics.topics-enter{animation:none}}

.discovery-heading h2{display:flex;align-items:center;gap:7px}.discovery-heading h2 .icon{color:var(--balu-primary)}
.capability-footer{text-align:center;margin:14px 0 0}.phone .capability-footer p{font-size:11px;line-height:1.5;margin:4px 0;color:var(--balu-muted)}
.capability-footer .input-mode{display:inline-flex;align-items:center;gap:3px;white-space:nowrap}.capability-footer .input-mode-ending{white-space:nowrap}.capability-footer .icon{width:13px;height:13px;flex-shrink:0;stroke-width:1.9}.capability-footer .input-mode-write .icon{color:var(--balu-secondary)}.capability-footer .input-mode-voice .icon{color:var(--balu-primary)}.capability-footer .input-mode-call .icon{color:var(--balu-on-peach)}
/* Content-sized bubbles, with explicit wrapping for long text and submitted details. */
.phone.reference-design .conversation-screen .user-message{width:fit-content;min-width:54px;max-width:88%;min-height:0}
.phone.reference-design .conversation-screen .user-message>.bubble{min-width:0;max-width:100%;overflow-wrap:anywhere;white-space:pre-wrap;word-break:normal}
.phone .details-list,.phone .details-list>div{min-width:0;max-width:100%}
.phone .details-list :is(dt,dd),.phone .details-title{white-space:normal;overflow-wrap:anywhere;word-break:normal;max-width:100%}
.phone.reference-design .conversation-screen .assistant-message{min-width:0;max-width:92%}.phone .assistant-message:has(.question-deck){max-width:100%}
.phone .reply-card,.phone .reply-copy{min-width:0;max-width:100%;overflow-wrap:anywhere}

/* Call topic is the primary interaction; narration is a quieter introduction. */
.phone.reference-design .call-feature-sheet .intro-voice{padding:7px 10px;margin:10px 0 18px;border-radius:17px}
.phone.reference-design .call-feature-sheet .intro-audio-row{gap:10px;align-items:center}
.phone.reference-design .call-feature-sheet .intro-toggle{width:36px;height:36px;min-height:36px;min-width:36px;flex-basis:36px}
.phone.reference-design .call-feature-sheet .intro-toggle .icon{width:17px;height:17px}
.phone.reference-design .call-feature-sheet .wave{height:23px;max-height:23px;overflow:hidden}
.phone.reference-design .call-feature-sheet .wave i{max-height:20px;max-width:3px}
.phone.reference-design .call-feature-sheet .field{font-size:14px;font-weight:500;margin-bottom:8px;text-align:left}
.phone.reference-design .call-feature-sheet textarea{min-height:85px;font-size:15px}

/* A. Sage + Cream, locked 29 September. Shared conversation roles. */
.phone .capability-footer p{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:2px 4px;line-height:18px}
.capability-footer :is(.input-mode,.input-mode-ending){display:inline-flex;align-items:center;line-height:18px;min-height:18px;vertical-align:middle}
.phone.reference-design .hint-button,.phone .hint-wrap .choice{background:var(--balu-honey);color:var(--balu-on-honey);border:1px solid var(--balu-secondary)}
.phone .reply-tools button{color:var(--balu-muted)}
.phone .chat-typing-presence{color:var(--balu-muted)}.phone .chat-typing-dots{color:var(--balu-primary)}
.phone .question-option{padding:10px 8px;border:1px solid var(--balu-border);border-radius:12px;margin:6px 0}
.phone .question-option[aria-pressed=true]{background:var(--balu-sage);border-color:var(--balu-primary);color:var(--balu-primary)}
.phone .question-free{background:var(--balu-paper)!important;font-size:16px!important}
.phone .voice-play{background:var(--balu-primary);color:var(--balu-cream);border-color:var(--balu-primary)}
.phone .voice-bubble .wave i{background:var(--balu-primary)}
.phone :is(.record-card,.completed-output){background:linear-gradient(125deg,var(--balu-sage),var(--balu-surface) 62%);box-shadow:var(--balu-shadow);border:0;border-radius:24px}
.phone :is(.record-card,.completed-output) h3{padding-bottom:12px;border-bottom:1px solid var(--balu-border);overflow-wrap:anywhere}
.phone .record-card .permission-body{padding:20px}.phone .record-card .permission-footer{padding:0 20px 20px;background:transparent}
.phone .record-card p{font-size:15px}.phone .record-card small{line-height:1.6}
.phone .record-badge{display:inline-block;font-size:11px;line-height:1.5;background:var(--balu-primary);color:var(--balu-cream);padding:4px 8px;border-radius:8px}
.phone .runtime-sheet .record-badge{display:inline-block;color:var(--balu-cream)}
.phone .consent-card{border:1px solid var(--balu-secondary);background:var(--balu-surface)}
.phone .call-feature-sheet textarea{font-size:16px}

.phone .reply-card.reply-error{background:var(--balu-error-surface);color:var(--balu-error);border:1px solid var(--balu-error)}
.phone .reply-card.reply-error .reply-copy{color:var(--balu-error)}

.phone.reference-design .conversation-screen .assistant-message:has(.question-deck){max-width:100%}

/* A capability is one user message. Keep its illustration and intent together. */
.phone .user-message .capability-message{background:var(--balu-sage);border:0;border-radius:20px 20px 5px 20px;padding:12px;margin:0;gap:12px;width:100%;box-sizing:border-box}
.phone .capability-message>div{min-width:0}
.phone .capability-message strong{font-size:16px;line-height:1.6;overflow-wrap:anywhere;font-weight:500}
.phone .capability-message :is(img,.ink-illustration){width:64px;height:76px;flex:0 0 64px;object-fit:cover;border-radius:10px}
.phone .output-body{overflow-wrap:anywhere;line-height:1.65;min-width:0}
.phone .output-body h3{font-size:17px;margin:20px 0 8px}
.phone .output-body p{margin:0 0 12px}
.phone .output-body :is(ul,ol){padding-left:24px}
.phone .output-body pre{white-space:pre-wrap;overflow-wrap:anywhere}
.phone .output-table-scroll{overflow-x:auto;max-width:100%;margin:12px 0}
.phone .output-table-scroll table{border-collapse:collapse;width:100%;font-size:14px}
.phone .output-table-scroll :is(th,td){padding:8px;text-align:left;border-bottom:1px solid var(--balu-border);min-width:80px}

/* Shared conversational elevation. One shadow per content surface, never per wrapper. */
.phone.reference-design .conversation-screen :is(.user-message>.bubble,.user-message>.capability-message,.reply-card,.question-deck,.completed-output){box-shadow:var(--balu-shadow-message)}

/* Saved memories: title and quiet, accessible actions share one header. */
.phone .memory-record .record-heading{display:flex;align-items:flex-start;gap:8px;border-bottom:1px solid var(--balu-border);padding-bottom:10px;margin-bottom:12px}
.phone .memory-record .record-heading h3{flex:1;min-width:0;margin:6px 0 0;padding:0;border:0}
.record-actions{display:flex;flex:none;gap:0}
.record-icon{width:44px;height:44px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;color:var(--balu-primary);background:transparent;cursor:pointer}
.record-icon .icon{width:20px;height:20px}
.record-icon:hover{background:var(--balu-sage)}
.record-icon:focus-visible{outline:2px solid var(--balu-primary);outline-offset:1px}
.phone .memory-confirm-backdrop{align-items:center;padding:18px}
.phone .memory-confirm{width:100%;max-height:calc(100% - 36px);padding:24px;border-radius:24px;overflow:auto}
.memory-confirm h2{margin:0 0 16px;font-size:22px;line-height:1.35}
.memory-confirm blockquote{margin:0 0 16px;padding:12px;border-radius:12px;background:var(--balu-sage);overflow-wrap:anywhere}
.memory-confirm p{font-size:14px;line-height:1.6}
.memory-confirm-actions{display:flex;gap:10px;margin-top:20px}
.memory-confirm-actions button{flex:1;min-width:0;min-height:44px;padding:12px 8px;white-space:normal;font-size:14px}
