/* The conversation keeps the photograph and editor controls in view. */
.panel-tabs { grid-template-columns:repeat(4,minmax(0,1fr)); }
.panel-tab { min-height:44px; }
.right-panel.agent-active .panel-heading { padding:16px 0 12px; }
.right-panel.agent-active .panel-footer { display:none; }
#tab-agent.active { display:flex;flex-direction:column;gap:12px; }
.agent-intro { display:flex;align-items:flex-start;gap:11px;padding:0 0 14px;border-bottom:1px solid #e9e2df; }
.agent-symbol { width:31px;height:31px;flex:none;display:grid;place-items:center;border:1px solid #d8c6cd;border-radius:7px;background:linear-gradient(145deg,#f3e9e9,#e8dbe1);color:#765767; }
.agent-symbol svg { width:17px;height:17px; }
.agent-intro strong { display:block;margin:1px 0 4px;color:#352d32;font-size:12px;letter-spacing:.01em; }
.agent-intro p { margin:0;color:#695d64;font-size:10px;line-height:1.6; }
.agent-context { display:flex;align-items:center;gap:7px;padding:8px 10px;background:#f5f2f0;border:1px solid #ebe4e1;border-radius:5px;color:#62555d;font-size:10px; }
.agent-context-dot { width:6px;height:6px;border-radius:50%;background:#a58291;box-shadow:0 0 0 3px #a5829120;flex:none; }
#agent-context-photo { flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:650; }
#agent-mode { flex:none;color:#6d5b65; }
.agent-thread { height:clamp(220px,34vh,340px);overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:13px;padding:4px 2px 3px;scrollbar-color:#d9cbd0 transparent; }
.agent-thread.empty { height:clamp(195px,30vh,270px); }
.agent-first { padding:15px 14px;border:1px solid #e5dbde;border-radius:5px;background:linear-gradient(150deg,#faf7f5,#f4eeef); }
.agent-first span { display:block;color:#705565;font-size:9px;font-weight:750;letter-spacing:.08em; }
.agent-first p { margin:9px 0;color:#53464c;font-family:Georgia,'Songti SC','STSong',serif;font-size:14px;line-height:1.6; }
.agent-first small { color:#6f6269;font-size:10px;line-height:1.5; }
.agent-message { max-width:100%; }
.agent-message.user { align-self:flex-end;max-width:89%;padding:9px 11px;border-radius:10px 10px 3px 10px;background:#ece5e7;color:#51434b;font-size:11px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere; }
.agent-message.assistant { align-self:stretch; }
.agent-message-head { display:flex;align-items:center;gap:7px;margin-bottom:6px;color:#745d69;font-size:10px;font-weight:750; }
.agent-message-head i { width:13px;height:13px;display:grid;place-items:center;border:1px solid #b89eab;border-radius:3px;font-size:9px;font-style:normal; }
.agent-message-head i img { width:100%;height:100%;display:block; }
.agent-message-body { color:#443a3f;font-size:11px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere; }
.agent-principle { margin:8px 0 0;padding:8px 10px;border-left:2px solid #b596a4;background:#f4efef;color:#745f69;font-size:10px;line-height:1.6; }
.agent-principle b { color:#59434f;font-weight:750; }
.agent-action { display:flex;align-items:center;gap:9px;margin-top:9px;padding:7px;border:1px solid #e4d8dc;border-radius:5px;background:#fffdfc; }
.agent-action img { width:43px;height:43px;object-fit:cover;border-radius:3px;flex:none; }
.agent-action-copy { flex:1;min-width:0; }
.agent-action-copy strong { display:block;color:#3f333a;font-size:10px;line-height:1.35; }
.agent-action-copy small { display:block;margin-top:3px;color:#70616a;font-size:9px;line-height:1.45; }
.agent-action button { flex:none;border:1px solid #bfaab3;background:#6f5664;color:#fff;border-radius:4px;padding:7px 8px;font-size:9px;font-weight:700;max-width:101px;line-height:1.25; }
.agent-action button:hover { background:#513e49; }
.agent-action button:disabled { background:#eee9eb;color:#867881;border-color:#e4d9dd; }
.agent-prompts { display:flex;gap:5px;flex-wrap:wrap; }
.agent-prompts button { padding:6px 8px;background:#fbfaf8;border:1px solid #ddd3d6;border-radius:4px;color:#77636e;font-size:9px;line-height:1.2; }
.agent-prompts button:hover { border-color:#ad91a0;background:#f5eef1; }
.agent-compose { display:flex;gap:7px;align-items:flex-end;padding:7px;border:1px solid #d8cbd0;border-radius:6px;background:#fff;box-shadow:0 3px 10px #49364008; }
.agent-compose:focus-within { border-color:#9e7c8d;box-shadow:0 0 0 3px #a17e9020; }
.agent-compose textarea { flex:1;min-width:0;min-height:38px;max-height:110px;resize:vertical;padding:5px 3px;border:0;outline:0!important;background:transparent;color:#443740;font-size:11px;line-height:1.55; }
.agent-compose textarea::placeholder { color:#766971; }
.agent-compose button { width:29px;height:29px;flex:none;display:grid;place-items:center;border:0;border-radius:4px;background:#6f5664;color:#fff; }
.agent-compose button:hover { background:#503c48; }
.agent-compose button:disabled { background:#cfc1c7; }
.agent-compose button svg { width:15px;height:15px; }
.agent-privacy { margin:-4px 1px 0;color:#6b5f66;font-size:9px;line-height:1.45; }
.agent-typing { display:flex;align-items:center;gap:4px;color:#6b5661;font-size:10px; }
.agent-typing i { width:4px;height:4px;border-radius:50%;background:#9a7888;animation:agent-pulse 1s ease-in-out infinite alternate; }
.agent-typing i:nth-child(3) { animation-delay:.18s; }
.agent-typing i:nth-child(4) { animation-delay:.36s; }
@keyframes agent-pulse { to { opacity:.25;transform:translateY(-3px); } }
@media(max-width:960px) {
  .panel-tabs { grid-template-columns:repeat(6,minmax(0,1fr)); }
  .agent-thread { height:300px; }
  .agent-thread.empty { height:225px; }
  .right-panel.agent-active .panel-heading { padding:21px 0 14px; }
}
@media(max-width:560px) {
  .panel-tabs { grid-template-columns:repeat(6,minmax(0,1fr)); }
  .agent-thread { height:285px; }
  .agent-thread.empty { height:215px; }
  .agent-intro { padding-bottom:12px; }
  .agent-prompts button { min-height:44px;padding:8px 11px;font-size:10px; }
  .agent-compose button { width:44px;height:44px; }
  .agent-action button { min-height:44px;padding:9px 10px; }
}

/* Location notes belong to the image; their text belongs to the conversation. */
.mark-photo-button { display:flex;align-items:center;gap:6px;margin-right:9px;padding:5px 9px;border:1px solid #625962;border-radius:4px;background:transparent;color:#d3c8cd;font-size:10px;font-weight:650;letter-spacing:.02em;white-space:nowrap; }
.mark-photo-button svg { width:14px;height:14px; }
.mark-photo-button:hover,.mark-photo-button.active { background:#725566;border-color:#a87a91;color:#fff; }
.photo-stage.marking { cursor:crosshair; }
.annotation-layer { position:absolute;z-index:4;inset:0;pointer-events:none; }
.annotation-box { position:absolute;pointer-events:auto;display:block;padding:0;border:1.5px solid #f7e2e8;background:#b987a122;color:white;box-shadow:0 0 0 1px #38263185,inset 0 0 16px #b987a11c; }
.annotation-box:hover,.annotation-box.selected { border-color:#fff1cc;background:#c793a535; }
.annotation-box span { position:absolute;left:-1px;top:-1px;display:grid;place-items:center;width:22px;height:22px;border-radius:0 0 4px 0;background:#543c4a;color:#fff;font-size:10px;font-weight:750;box-shadow:0 2px 6px #0005; }
.annotation-box.selected span { background:#8e6278; }
.photo-stage.marking .annotation-box { pointer-events:none; }
.annotation-draft { position:absolute;z-index:5;pointer-events:none;border:1.5px dashed #fff4dc;background:#cba5ad3d;box-shadow:0 0 0 1px #573742ab; }
.annotation-draft[hidden] { display:none; }
.annotation-board { border:1px solid #e5dce0;border-radius:6px;background:#faf7f6;padding:11px; }
.annotation-board-head { display:flex;align-items:center;justify-content:space-between;gap:10px; }
.annotation-board-head strong { display:block;color:#47343f;font-size:11px; }
.annotation-board-head small { display:block;margin-top:3px;color:#77686f;font-size:9px;line-height:1.4; }
.annotation-board-head button { flex:none;padding:6px 9px;border:1px solid #c9b5bd;border-radius:4px;background:#fff;color:#6e4d5d;font-size:10px;font-weight:700; }
.annotation-board-head button:hover { background:#f3e9ed; }
.annotation-list { display:flex;flex-wrap:wrap;gap:6px;margin-top:10px; }
.annotation-empty { margin:0;color:#776970;font-size:10px;line-height:1.5; }
.annotation-list-item { max-width:100%;display:flex;align-items:center;gap:6px;padding:5px 8px 5px 5px;border:1px solid #e0d2d9;border-radius:4px;background:#fff;color:#594950;font-size:10px;text-align:left; }
.annotation-list-item.selected { border-color:#a47c90;background:#f3e9ed; }
.annotation-list-item span { display:grid;place-items:center;flex:none;width:17px;height:17px;border-radius:3px;background:#78566a;color:#fff;font-size:9px;font-weight:750; }
.annotation-list-item em { max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:normal; }
.annotation-editor { margin-top:10px; }
.annotation-editor[hidden] { display:none; }
.annotation-editor label { display:block;margin-bottom:5px;color:#5c4853;font-size:10px;font-weight:750; }
.annotation-editor textarea { display:block;width:100%;min-height:59px;max-height:120px;resize:vertical;padding:8px 9px;border:1px solid #d8c9d0;border-radius:4px;background:#fff;color:#443740;font:inherit;font-size:10px;line-height:1.5; }
.annotation-editor textarea:focus { outline:2px solid #bd9aab;outline-offset:1px; }
.annotation-local-controls { margin-top:9px;padding:9px;border:1px solid #e3d4db;border-radius:4px;background:#fff; }
.annotation-local-controls[hidden] { display:none; }
.annotation-local-controls div { display:flex;justify-content:space-between;align-items:center;color:#66525d;font-size:10px;font-weight:700; }
.annotation-local-controls input { display:block;width:100%;margin:10px 0 6px;accent-color:#886579; }
.annotation-local-controls button { padding:2px 0;border:0;background:transparent;color:#806a75;font-size:9px;text-decoration:underline; }
.annotation-editor-actions { display:flex;justify-content:space-between;gap:9px;margin-top:7px; }
.annotation-editor-actions button { min-height:29px;border:0;background:transparent;color:#7a626e;font-size:10px;font-weight:700; }
.annotation-editor-actions button:last-child { padding:6px 10px;border-radius:4px;background:#6f5664;color:white; }
.annotation-editor-actions button:last-child:hover { background:#513e49; }
.annotation-editor-actions button:disabled { opacity:.45; }
.annotation-hint { margin:9px 0 0;color:#8a7c83;font-size:9px;line-height:1.45; }
.annotation-board:has(.annotation-list-item) + .agent-context + .agent-thread { height:clamp(170px,23vh,245px); }
@media(max-width:560px) { .mark-photo-button { margin-right:4px;padding:5px; }
  .mark-photo-button > span:last-child { display:none; }
  .mark-photo-button svg { width:17px;height:17px; }
  .annotation-board-head button,.annotation-editor-actions button { min-height:40px; }
  .annotation-box span { width:26px;height:26px;font-size:12px; }
}
