.hm-screen { background: #f8f8f8; color: #303030; }
.hm-header { display: grid; grid-template-columns: 80px minmax(0,1fr) 80px; gap: 0; flex-shrink: 0; }
.hm-title { min-width: 0; margin: 0; text-align: center; font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-brand { font-family: Georgia, 'Times New Roman', serif; font-size: 16px; letter-spacing: .1em; }
.hm-header-actions { display: flex; justify-content: flex-end; }
.hm-icon { flex: 0 0 40px; width: 40px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; color: #727272; cursor: pointer; padding: 8px; }
.hm-icon svg { width: 23px; height: 23px; }
.hm-icon:disabled { opacity: .35; cursor: default; }
.hm-list { padding: 18px 16px; }
.hm-story { width: 100%; padding: 20px 16px; margin-bottom: 12px; border: 1px solid #e5e5e5; border-radius: 12px; background: #fff; cursor: pointer; }
.hm-story strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.hm-story small { display: block; color: #888; margin-top: 8px; font-size: 12px; }
.hm-empty { padding: 50px 12px; color: #999; text-align: center; line-height: 1.9; font-size: 14px; }
.hm-room-stage { position: relative; display: flex; flex: 1; min-height: 0; flex-direction: column; }
.hm-messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px; }
.hm-card { background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; padding: 16px; margin: 0 0 16px; }
.hm-card-head { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #ededed; padding-bottom: 11px; margin-bottom: 13px; }
.hm-sender { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 13px; font-weight: 600; }
.hm-sender img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.hm-sender-meta { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 3px; }
.hm-floor { flex-shrink: 0; font-size: 11px; line-height: 1; font-weight: 400; color: #888; }
.hm-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.9; }
.hm-story, .hm-card { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: pan-y; }
.world-book-item { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: pan-y; }
.hm-card.selected { border-color: #666; box-shadow: inset 0 0 0 1px #666; }
.hm-candidates { display: flex; align-items: center; justify-content: flex-start; gap: 12px; margin-top: 12px; color: #888; font-size: 12px; }
.hm-candidates button { background: #f3f3f3; border: 0; color: #555; border-radius: 6px; padding: 5px 12px; }
.hm-note { font-size: 12px; color: #888; line-height: 1.6; margin: 10px 0 0; }
.hm-composer { display: flex; flex-shrink: 0; align-items: flex-end; gap: 10px; padding: 10px 12px max(10px,env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #e8e8e8; }
.hm-composer textarea { flex: 1; min-width: 0; height: 42px; min-height: 42px; max-height: 180px; box-sizing: border-box; padding: 10px 12px; resize: none; border: 1px solid #e5e5e5; border-radius: 15px; font-size: 15px; line-height: 22px; background: #f8f8f8; color: #333; font-family: var(--font-family); }
.hm-composer textarea:focus { outline: none; border-color: #000; box-shadow: 0 0 0 3px rgba(0,0,0,.05); }
.hm-status { flex-shrink: 0; text-align: center; background: #f8f8f8; color: #aaa; font-style: italic; font-size: 14px; line-height: 1.5; margin: 0; padding: 8px 12px; }
.hm-status:empty { display: none; }
.hm-status:not(:empty) + .hm-jump-controls { bottom: 50px; }
.hm-jump-controls { position: absolute; right: 13px; bottom: 12px; z-index: 4; display: flex; flex-direction: column; align-items: center; padding: 5px 3px; border: 1px solid rgba(255,255,255,.75); border-radius: 999px; background: rgba(45,45,45,.62); box-shadow: 0 3px 14px rgba(0,0,0,.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transform: translateY(5px); pointer-events: none; transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s; }
.hm-jump-controls.visible { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; transition-delay: 0s; }
.hm-jump-controls .hm-icon { width: 34px; height: 34px; flex-basis: 34px; padding: 7px; color: rgba(255,255,255,.94); }
.hm-jump-controls .hm-icon svg { width: 19px; height: 19px; }
.hm-selection { display: flex; align-items: center; gap: 8px; padding: 12px; background: #fff; }
.hm-selection .btn { width: auto; margin: 0; padding: 8px 12px; }
.hm-selection span { margin-right: auto; font-size: 12px; }
.hm-selection[hidden], .hm-composer[hidden] { display: none; }
.hm-modal { max-height: 85dvh; overflow-y: auto; width: min(92%, 480px); box-sizing: border-box; }
.hm-modal textarea, .hm-modal input, .hm-modal select { box-sizing: border-box; width: 100%; font-family: var(--font-family); font-size: 14px; color: #333; padding: 10px; border: 1px solid #ddd; border-radius: 8px; background: #fff; }
.hm-modal textarea { resize: vertical; min-height: 100px; -webkit-user-select: text; user-select: text; }
.hm-modal input { -webkit-user-select: text; user-select: text; }
.hm-modal .form-group { margin-bottom: 15px; }
.hm-modal label { display: block; font-size: 13px; margin-bottom: 7px; }
.hm-modal #hm-modal-close { margin-top: 14px; }
.hm-modal #hm-fetch-models { margin-bottom: 18px; }
#homotopy-summary-screen .content { background: #f0f2f5; padding: 10px; }
.hm-summary-list .summary-card { box-sizing: border-box; }
.hm-summary-list .summary-card.is-paused { opacity: .72; }
.hm-summary-list .summary-actions { flex-shrink: 0; }
.hm-summary-list .summary-action-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hm-summary-list .summary-action-btn.pause:hover { color: #777; }
.hm-summary-list .summary-state { font-size: 12px; color: #999; margin-top: 4px; }
.hm-token-count { padding: 10px; margin-bottom: 15px; background: #f0f0f0; border-radius: 8px; font-size: 14px; color: #555; text-align: center; font-weight: bold; }
.hm-screenshot-stage { position: fixed; left: -10000px; top: 0; background: #f8f8f8; color: #303030; padding: 14px; box-sizing: border-box; font-family: var(--font-family); }
.hm-screenshot-stage h3 { text-align: center; font-size: 15px; margin: 5px 0 15px; }
