html,body{width:100%;height:100%;margin:0;overflow:hidden;background:#f9f7ef}
body{display:block;min-width:0;padding:0;font-size:16px}
#app{position:relative;width:100%;height:100%;max-height:none;border-radius:0;overflow:hidden}
.statusbar,.gesture{display:none!important}
.mobile-preview-badge{display:none!important}
#app .app-view{padding-top:0}
#app .appnav{padding-bottom:4px}
.host-lock{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:28px;text-align:center;gap:18px}
.host-state{font-size:14px;line-height:1.7;color:#665d4f}
.host-delete{justify-content:flex-start;align-items:stretch;text-align:left;overflow-y:auto;gap:16px}
.host-delete h1{font-size:24px;margin:12px 0 0}.host-delete p{line-height:1.65;margin:0}
.delete-counts{display:grid;grid-template-columns:1fr auto;gap:8px 18px;margin:0;padding:16px;background:#f0ead9;border-radius:14px}.delete-counts dd{margin:0}
.host-pending{padding:10px 16px;background:#f0ead9;color:#645747;font-size:14px}
button,input,textarea,select{font:inherit}
button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #596d49;outline-offset:3px}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
.memory-disclosure{border-bottom:1px solid var(--line,#deded4);padding:12px 0;min-width:0}
.memory-disclosure>summary{cursor:pointer;min-height:44px;display:list-item;overflow-wrap:anywhere;line-height:1.5}
.memory-disclosure>summary small{display:block;color:var(--muted,#667264);font-size:.85em;font-weight:400}
.memory-context-piece{padding:8px 0 12px}.memory-context-piece+.memory-context-piece{border-top:1px solid var(--line,#deded4)}
.memory-context-list{margin-top:12px}.memory-disclosure .body-text{white-space:pre-wrap;overflow-wrap:anywhere}
.summary-more-actions{display:flex;flex-direction:column;gap:10px}.summary-more-actions button{width:100%;white-space:normal}
html.host-ime #app .appnav{display:none}
#app .chat-view>.appbar{min-height:64px;padding:8px 4px 14px;gap:6px;flex-wrap:wrap}
#app .chat-view .appbar-title h2{display:block;white-space:normal;overflow:visible;font-size:23px;line-height:1.4}
#app .chat-view .bar-actions{flex-wrap:wrap;gap:4px;margin-left:auto}
#app .chat-view .bar-action{font-size:14px;white-space:normal;min-height:44px}
#app .chat-view .appbar .icon-btn{width:44px;height:44px}
#app .composer textarea{font-size:16px;min-height:48px;max-height:112px}
#app .send-btn{font-size:14px;min-height:48px;max-width:120px;white-space:normal}
.host-chat-status{flex-shrink:0;max-height:38%;overflow:auto;padding:8px 12px;border-top:1px solid var(--line);font-size:13px;line-height:1.6}
.host-chat-status p{margin:0}.host-chat-status button{min-height:40px;padding:5px 9px;font-size:14px}
.host-chat-status details{margin-top:4px}.host-chat-status details p{white-space:pre-wrap;overflow-wrap:anywhere}
#app .appbar h2,#app .modal-header h3{overflow-wrap:anywhere}
#app .appbar .bar-actions,#app .actions-row,#app .modal-actions{flex-wrap:wrap}
#app .modal-actions .btn{flex:1 1 110px;white-space:normal}
#app .summary-content label{display:block;margin:10px 0 16px;font-size:14px}
#app .summary-content label>.field{margin-top:6px}
#app.large-text .summary-content label,#app.large-text .field,#app.large-text .composer textarea{font-size:17px}
#app .editor-date,#app .record-date{line-height:1.35;margin-bottom:12px}
#app .editor-tools,#app .day-card .card-top{flex-wrap:wrap}
#app .editor-bottom{flex-wrap:wrap}#app .editor-bottom small{max-width:100%;flex:1 1 130px}
[data-room-loading]{position:absolute;left:16px;right:16px;top:14px;text-align:center;color:#5e573e;background:#fff8e3e6;border-radius:10px;padding:8px;font-size:13px}
.calendar-record-settings{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;min-width:44px;min-height:44px;padding:10px 12px;border-radius:12px}
.calendar-record-settings:hover{background:#e8eddf}
#app .day.today:after{content:none}
.calendar-entry-marks{position:absolute;top:5px;right:6px;display:flex;align-items:center;gap:3px}
.calendar-mark{display:block;width:4px;height:4px;border-radius:50%;background:#7e9670}
.calendar-mark.concern-mark{background:#b86e6a}
#app .day-row .calendar-entry-marks{position:static;flex:0 0 auto;margin-left:auto}
#app .host-chat-wait{display:flex;align-items:center;min-height:28px;max-height:none;padding:0 12px;border:0;overflow:visible}
.chat-wait-dots{display:flex;align-items:center;gap:5px;padding:12px 4px}
.chat-wait-dots i{width:5px;height:5px;border-radius:50%;background:#819573;animation:chat-wait-pulse 1.4s ease-in-out infinite}
.chat-wait-dots i:nth-child(2){animation-delay:.18s}.chat-wait-dots i:nth-child(3){animation-delay:.36s}
.chat-wait-stop{width:44px;height:44px;margin-left:6px;color:#627d56}
.chat-wait-stop span{display:block;width:10px;height:10px;border-radius:2px;background:currentColor}
@keyframes chat-wait-pulse{0%,70%,100%{opacity:.35;transform:translateY(0)}35%{opacity:1;transform:translateY(-3px)}}
#app .tutorial-single .tutorial-annotations .tutorial-bubble{padding:16px 18px;border:1px solid #d4dfc8;border-radius:20px;background:linear-gradient(145deg,#fffef9,#f0f5e7);box-shadow:0 7px 20px #4e684017;color:#40583f;font-size:16px;line-height:1.8;letter-spacing:.15px}
#app .tutorial-single .tutorial-annotations .tutorial-bubble:after{top:-6px;left:25px;width:10px;height:10px;border-color:#d4dfc8;background:#fbfcf4}
#app.large-text .tutorial-single .tutorial-annotations .tutorial-bubble{font-size:18px}
#app .tutorial-single>.tutorial-stage{overflow-y:auto;touch-action:pan-x pan-y}

/* History keeps topic, preview and metadata on distinct readable lines. */
.history-index{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}
.history-conversation .list-card,.concern-folder{display:block;width:100%;text-align:left}
.history-conversation strong,.concern-folder strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:18px;line-height:1.55;overflow-wrap:anywhere}
.history-conversation small,.concern-folder small{display:block;margin-top:10px;font-size:13px;color:var(--muted,#758175)}
.history-preview{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:8px 0 0;font-size:15px;line-height:1.65;color:var(--muted,#758175);font-weight:400}
.history-date{font-size:16px;margin:24px 0 12px}.concern-memory{margin:24px 0}.context-profile-link{border-top:1px solid var(--line,#dedfd2);margin-top:20px;padding-top:8px}
.current-concern-context h3{font-size:18px;margin:4px 0 12px}.memory-disclosure summary{min-height:44px;line-height:1.55}.memory-disclosure summary small{display:block;font-size:12px;font-weight:400}
.assignment-options{display:grid;gap:8px}.assignment-options label{display:flex;align-items:center;gap:12px;min-height:48px;padding:10px;border-radius:12px}.assignment-options input{flex-shrink:0}.assignment-options label:has(input:checked){background:var(--sage,#e8eddd)}
.summary-destination{font-size:14px;color:var(--muted,#758175);margin:12px 0}
/* D2 content stays in the phone viewport on both hosts. */
.flow-title{font-size:22px;line-height:1.5;margin:4px 0 12px;overflow-wrap:anywhere}
.flow-date,.flow-context{color:var(--muted,#737c70);margin:4px 0 16px}
.flow-body{line-height:1.9;margin:0 0 20px;white-space:pre-wrap;overflow-wrap:anywhere}
.flow-name-hint{margin:-8px 0 18px}
.flow-review{margin-top:18px}
.flow-review summary{cursor:pointer;display:block;padding:6px 0}
.flow-review summary>span{display:block;font-size:13px;color:var(--muted,#737c70);margin-bottom:6px}
.flow-review summary>strong{display:block;overflow-wrap:anywhere}
.flow-concern>.list-card{width:100%;border:0;border-radius:0;background:transparent;padding:0;text-align:left}
.flow-concern>.text-btn{margin-top:10px}
.flow-management{display:grid;gap:10px;margin:10px 0}
.flow-pending-note{padding:8px 18px;background:#f0f1e7;font-size:12px;line-height:1.7}
.flow-pending-note .text-btn{font-size:12px;margin-left:6px}

.flow-name-button{display:flex;align-items:center;gap:6px;max-width:100%;border:0;background:none;color:inherit;font:inherit;padding:3px 0;text-align:left;cursor:pointer}.flow-name-button span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.flow-concern [aria-pressed="true"]{outline:2px solid var(--ink,#344a41);outline-offset:-2px}.flow-context{margin:0 0 12px}
.chat-draft-state{font-size:11px;line-height:1.4;margin:2px 4px 0;color:var(--muted)}
