/* The agents app (issue #63): what it adds to the Studio's frame (shell.css, work.css) — the agents' cards on the home, the drop
   zones and files of « My data ». Tokens only (base.css): no colour of its own. */
.use-tools { margin: 0 0 14px; }
.use-q input { width: min(100%, 360px); }
.use-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.use-top { margin: 0 0 18px; }
.use-fam { margin: 0 0 20px; }
.use-fam h2 { margin: 0 0 8px; font: 700 11px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.use-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; }
.use-card:hover, .use-card:focus-visible { background: var(--hover); border-color: var(--line); }
.use-card[hidden] { display: none; }
.use-ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-ink); }
.use-ic svg { width: 20px; height: 20px; }
.use-chef .use-ic { background: var(--accent); color: var(--on-accent); }
.use-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.use-tx b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.use-tx small { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.use-go { flex: none; color: var(--muted); }
.use-go svg { width: 18px; height: 18px; }

.use-drop { margin: 10px 0 12px; padding: 16px; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); text-align: center; color: var(--muted); }
.use-drop p { margin: 2px 0; }
.use-drop svg { width: 16px; height: 16px; vertical-align: -3px; }
.use-drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.use-drop .lnk { cursor: pointer; color: var(--accent-ink); text-decoration: underline; }
.use-fn { display: inline-flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.use-fn svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.use-checks { display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
.use-instr textarea { width: 100%; }
.use-instr details { margin: 6px 0; }

/* the one-time notification prompt (issue #86, public/use/push.js) */
.push-ask { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; width: min(92vw, 420px);
  background: var(--surface); color: inherit; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-pop); }
.push-ask p { margin: 0 0 10px; }

/* ---------- the phone: a messaging app (issue #87) ---------- */
/* avatars: the five colours only, each with a text colour of AA contrast (white on blue / navy, navy on sky / yellow) */
.use-av { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%; font: 700 17px var(--display); letter-spacing: .02em; }
.use-av.sm { width: 36px; height: 36px; font-size: 14px; }
.use-av.av0 { background: var(--blue); color: var(--white); }
.use-av.av1 { background: var(--navy); color: var(--white); box-shadow: inset 0 0 0 1.5px var(--line); }
.use-av.av2 { background: var(--sky); color: var(--navy); }
.use-av.av3 { background: var(--yellow); color: var(--navy); }
.use-phone { display: none; }
.via.voice { display: block; font-size: .85em; font-weight: 700; margin: 0 0 4px; }
@media (max-width: 782px) {
  .use-phone { display: block; }
  .use-wide { display: none !important; }
  /* readable: 18 px by default, following the device's text size (rem); touch targets of 48 px */
  #main { font-size: 1.125rem; }
  #main .btn, #main button, #main select, #main input, #main textarea { font-size: 1.0625rem; }
  #main .btn, #main .cmp-mini, #main .cmp-send, #main .cmp-plus, #main .use-back, #tabbar a { min-height: 48px; min-width: 48px; }
  .use-ph-h { margin: 4px 0 12px; font-size: 1.6rem; }
  .use-q { display: block; margin: 0 0 10px; } .use-q input { width: 100%; min-height: 48px; }
  .use-cts { list-style: none; margin: 0; padding: 0; }
  .use-cts li[hidden] { display: none; }
  .use-ct { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 8px 2px; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
  .use-ct:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  .use-ct-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
  .use-ct-top { display: flex; align-items: baseline; gap: 8px; }
  .use-ct-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
  .use-ct-top time { flex: none; font-size: .8em; color: var(--muted); }
  .use-ct-line { display: flex; align-items: center; gap: 8px; color: var(--muted); }
  .use-ct-line span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .use-ct.unread .use-ct-line { color: var(--ink); font-weight: 600; }
  .use-ct.unread time { color: var(--accent-ink); font-weight: 700; }
  .use-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
  .use-install { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--accent-soft); }
  .use-install p { margin: 0 0 8px; }
  /* a conversation: the back bar, bubbles on both sides */
  .use-bar { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; z-index: 5; background: var(--bg); }
  .use-bar b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.1rem; }
  .use-back { display: grid; place-items: center; font-size: 2rem; line-height: 1; color: var(--ink); text-decoration: none; }
  .msg.ai .bub { display: inline-block; max-width: 92%; padding: 10px 15px; border-radius: 18px 18px 18px 4px; background: var(--surface); border: 1px solid var(--line-2); }
  .msg.user .bub { max-width: 88%; }
  .cmp-note { display: none; }
}
.cmp-rec { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--accent-ink); }
.cmp-rec[hidden] { display: none; }
.cmp-mic.on { background: var(--accent); color: var(--on-accent); border-radius: 50%; }
.cmp-photo { display: inline-grid; place-items: center; cursor: pointer; }
.cmp-photo svg, .cmp-mic svg { width: 20px; height: 20px; }

/* ---------- messages between people (issue #88, public/use/people.js) ---------- */
.pp-host { display: flex; flex-direction: column; height: calc(100dvh - var(--topbar)); }
@media (max-width: 782px) { .pp-host { height: calc(100dvh - var(--topbar) - 64px - env(safe-area-inset-bottom)); } }
.pp-msgs { flex: 1; overflow-y: auto; padding: 12px 14px; }
.pp-msgs .msg.ai .bub { display: inline-block; max-width: 88%; padding: 10px 15px; border-radius: 18px 18px 18px 4px; background: var(--surface); border: 1px solid var(--line-2); }
.pp-who { display: block; font-size: .8em; font-weight: 700; color: var(--accent-ink); margin: 0 0 2px; }
.pp-agent .bub { border-color: var(--accent) !important; }
.pp-meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: .75em; color: var(--muted); margin-top: 2px; }
.pp-more { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 6px; font-size: 1.2em; line-height: 1; }
.pp-img { display: block; max-width: min(100%, 320px); border-radius: var(--radius-sm); margin: 2px 0 4px; }
.pp-gone .bub { opacity: .8; }
.pp-older, .pp-empty { text-align: center; }
.pp-cmp { display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); background: var(--bg); }
.pp-cmp textarea { flex: 1; min-height: 44px; max-height: 40vh; resize: none; border-radius: 22px; padding: 10px 14px; }
.pp-cmp .cmp-send { border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 1.1rem; cursor: pointer; min-width: 44px; min-height: 44px; }
.pp-cmp .cmp-mini { border: 0; background: none; cursor: pointer; font-size: 1.25rem; min-width: 44px; min-height: 44px; }
.pp-pick { border: 0; margin: 0 0 12px; padding: 0; }
.pp-pick legend { font-weight: 700; margin-bottom: 6px; }
.pp-row { display: flex; align-items: center; gap: 10px; min-height: 48px; flex-wrap: wrap; }
.use-ph-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
