/* Talk, Places, Agents: values from Talk.dc.html, PhoneTalk.dc.html, Places.dc.html, Agents.dc.html, DesktopAgents.dc.html. */
.pg [hidden] { display: none !important; }
.pg .phone-head, .pg .phone-nav, .pg .phone-only { display: none; }
.pg .box { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-16); padding: 16px 18px; }
.pg h2 { margin: 0 0 10px 0; font-size: 16px; font-weight: 600; }
.pg .col { display: flex; flex-direction: column; gap: 10px; }
.pg .col h2 { margin: 0; }
.pg .tag { font-size: var(--fs-11); font-weight: 600; letter-spacing: 0.06em; }
.pg .tag.blue { color: var(--accent); }
.pg .tag.green { color: var(--green); }
.pg .tag.amber { color: var(--amber); background: var(--amber-soft); padding: 4px 8px; border-radius: 6px; }
.pg .mono { font-family: var(--mono); }
.pg .muted { color: var(--muted); }
.pg .s13 { font-size: var(--fs-13); }
.pg .green { color: var(--green); }
.pg .amber { color: var(--amber); }
.pg .scroll { overflow-x: auto; }
.pg button.small { height: 32px; padding: 0 10px; border-radius: var(--r-8); border: 1px solid var(--stroke); background: var(--card);
  font-size: var(--fs-12); color: var(--text); }
.pg button.small.dark { border: none; background: var(--text); color: var(--card); }
.pg button.small:disabled { color: var(--muted); cursor: default; }
.pg table.grid { width: 100%; border-collapse: collapse; font-size: var(--fs-13); }
.pg .grid th { text-align: left; color: var(--muted); padding: 8px 6px; font-weight: 500; }
.pg .grid td { padding: 10px 6px; }
.pg .grid tbody tr { border-top: 1px solid var(--soft); }
.pg .grid tr.warn { background: var(--warn-row); }
.pg .grid a { text-decoration: none; }

/* ---------------- Talk */
.talk .wrap { align-items: flex-start; }
.talk-main { flex: 999 1 620px; min-width: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-18);
  display: flex; flex-direction: column; min-height: 840px; }
.thread { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 22px; max-width: 820px; width: 100%; margin: 0 auto; }
.mine { align-self: flex-end; max-width: 520px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.bubble { background: var(--text); color: var(--card); border-radius: 16px 16px 4px 16px; padding: 12px 16px; font-size: var(--fs-15);
  line-height: 1.45; white-space: pre-wrap; }
.shot { width: 280px; height: 160px; border-radius: var(--r-12); background: var(--shot-2) center / cover no-repeat; position: relative; overflow: hidden; }
.shot span { position: absolute; left: 10px; top: 10px; font-size: var(--fs-12); color: var(--clip-text); }
.shot i { position: absolute; border: 2px solid var(--amber-mark); border-radius: 6px; }
.reply { align-self: flex-start; max-width: 600px; background: var(--tile); border-radius: 16px 16px 16px 4px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px; font-size: var(--fs-15); }
.understood { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-12); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px; }
.understood .ua { font-size: var(--fs-15); line-height: 1.45; }
.understood .links { display: flex; gap: 14px; font-size: var(--fs-13); }
.understood .links a { text-decoration: none; font-weight: 600; }
.refined { margin: 4px 0 0 0; padding-left: 18px; font-size: var(--fs-13); color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.fix { display: flex; gap: 8px; }
.fix input { flex: 1; min-width: 0; height: 36px; border-radius: var(--r-8); border: 1px solid var(--border); padding: 0 10px; font: inherit; font-size: var(--fs-14); }
.fix button { height: 36px; padding: 0 12px; border-radius: var(--r-8); border: none; background: var(--text); color: var(--card); font-size: var(--fs-13); }
.rnote { font-size: var(--fs-14); color: var(--muted); }
.question { align-self: stretch; border: 1px solid var(--border); border-radius: var(--r-16); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.qhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qtext { font-size: 16px; font-weight: 600; }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.opt { border-radius: var(--r-12); border: 1px solid var(--outline); background: var(--card); padding: 0; overflow: hidden; display: flex;
  flex-direction: column; text-align: left; }
.opt.on { border: 2px solid var(--accent); }
.opic { height: 150px; width: 100%; background: var(--shot-2) center / cover no-repeat; display: flex; align-items: center; justify-content: center;
  color: var(--clip-text); font-size: var(--fs-12); }
.opt:first-child .opic { background-color: var(--shot); }
.ocap { padding: 10px 12px; display: flex; justify-content: space-between; width: 100%; gap: 6px; }
.ocap b { font-size: var(--fs-15); font-weight: 600; color: var(--text); }
.ocap span { font-size: var(--fs-11); font-weight: 600; color: var(--accent); }
.composer { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--soft); }
.composer .sq { width: 46px; height: 46px; border-radius: var(--r-12); border: 1px solid var(--border); background: var(--card); display: flex;
  align-items: center; justify-content: center; flex: none; padding: 0; }
.composer .sq.on { border-color: var(--accent); }
.composer .sq:disabled { cursor: default; }
.composer .msg { flex: 1; min-width: 0; height: 46px; border-radius: var(--r-12); background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 14px; }
.composer .msg input { flex: 1; min-width: 0; border: none; outline: none; font: inherit; font-size: var(--fs-15); background: none; color: var(--text); }
.composer .send { height: 46px; padding: 0 20px; border-radius: var(--r-12); border: none; background: var(--text); color: var(--card);
  font-size: var(--fs-14); font-weight: 600; }
.talk-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.talk-side h2 { margin-bottom: 12px; }
.tlist { display: flex; flex-direction: column; gap: 12px; }
.trow { display: flex; flex-direction: column; gap: 4px; }
.trow + .trow { border-top: 1px solid var(--soft); padding-top: 12px; }
.trow > div { display: flex; justify-content: space-between; gap: 8px; }
.trow b { font-size: var(--fs-14); font-weight: 600; }
.trow .st { font-size: var(--fs-12); }
.trow .st.accent { color: var(--accent); }
.trow .st.muted { color: var(--muted); }
.trow small, .talk-side small { font-size: var(--fs-13); color: var(--muted); }
.talk-side .quiet { font-size: var(--fs-13); color: var(--muted); line-height: 1.5; }

/* ---------------- Places */
.pmain { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.places .side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.places .box:not(.place) { border-radius: var(--r-18); }
.places .side .box { border-radius: var(--r-16); }
.place { padding: 0; overflow: hidden; display: flex; flex-wrap: wrap; border-radius: var(--r-18); }
.capture { flex: 1 1 320px; min-height: 240px; background: var(--shot) center / cover no-repeat; position: relative; }
.capture span { position: absolute; left: 14px; top: 14px; font-size: var(--fs-12); color: var(--clip-text); background: var(--scrim-soft);
  padding: 4px 8px; border-radius: 6px; }
.pinfo { flex: 1 1 360px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.ptitle { display: flex; flex-direction: column; gap: 4px; }
.ptitle h1 { margin: 0; font-size: 22px; font-weight: 600; }
.ptitle .muted { font-size: var(--fs-13); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--tile); border-radius: var(--r-10); padding: 10px 12px; }
.tile .k { font-size: var(--fs-12); color: var(--muted); }
.tile .v { font-size: var(--fs-15); font-weight: 600; margin-top: 2px; }
.acts { display: flex; gap: 10px; flex-wrap: wrap; }
.acts .dark { height: 44px; padding: 0 18px; border-radius: var(--r-12); background: var(--text); color: var(--card); text-decoration: none;
  display: flex; align-items: center; gap: 8px; font-size: var(--fs-14); font-weight: 600; }
.acts .dark:hover { color: var(--card); background: var(--accent-hover); }
.acts .ghost { height: 44px; padding: 0 16px; border-radius: var(--r-12); border: 1px solid var(--outline); background: var(--card);
  font-size: var(--fs-14); color: var(--text); }
.places .grid td.refused { color: var(--warn-text); }
.lockrow { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-14); }
.locked { font-size: var(--fs-11); font-weight: 600; color: var(--muted); background: var(--soft); padding: 3px 7px; border-radius: 6px; }
.places .side small { font-size: var(--fs-12); color: var(--muted); }
.places .lead { font-size: var(--fs-14); }

/* ---------------- Agents */
.awrap { max-width: 1440px; margin: 0 auto; padding: 20px var(--gutter); display: flex; flex-direction: column; gap: 16px; }
.agents .box { border-radius: var(--r-18); }
.health { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-14); padding: 14px 16px; }
.stat .k { font-size: var(--fs-12); color: var(--muted); }
.stat .v { font-size: 16px; font-weight: 600; margin-top: 4px; display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 4px; display: inline-block; flex: none; background: var(--muted); }
.dot.green { background: var(--green); }
.dot.blue { background: var(--accent); }
.dot.amber { background: var(--amber); }
.dot.light { background: var(--blue-light); }
.agents .thead { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.agents .thead h1 { margin: 0; font-size: 18px; font-weight: 600; }
.agents .thead span { font-size: var(--fs-12); color: var(--muted); }
.agents .grid td { padding: 11px 6px; }
.agents .grid td.b { font-weight: 600; }
.agents .grid td.nw { white-space: nowrap; }
.state { display: inline-flex; align-items: center; gap: 6px; }
.state.amber { color: var(--warn-text); }
.agents .grid td.warnt { color: var(--warn-text); }
.state.green, .state.blue, .state.light { color: var(--text); }
.ctx { display: flex; align-items: center; gap: 8px; }
.ctx .bar { width: 70px; height: 6px; border-radius: 3px; background: var(--soft); }
.ctx .bar div { height: 6px; border-radius: 3px; background: var(--accent); }
.ctx .bar div.hot { background: var(--ctx-hot); }
.agents .open { font-size: var(--fs-12); font-weight: 600; }
.agents tr.peek td { padding: 0 6px 10px 6px; }
.agents tr.peek pre { margin: 0; padding: 10px 12px; background: var(--tile); border-radius: var(--r-10); font-family: var(--mono);
  font-size: var(--fs-12); white-space: pre-wrap; }
.foot-line { font-size: var(--fs-12); color: var(--muted); margin-top: 10px; }
.below { display: flex; flex-wrap: wrap; gap: 16px; }
.below .box { flex: 1 1 420px; min-width: 0; font-size: var(--fs-14); }
.wlist { display: flex; flex-direction: column; gap: 10px; }
.wlist > div { display: flex; justify-content: space-between; gap: 10px; }
.wlist > div + div { border-top: 1px solid var(--soft); padding-top: 10px; }

/* ---------------- Phone (PhoneTalk.dc.html; Places and Agents use the same shell) */
@media (max-width: 600px) {
  body.phone-shell .top { display: none; }
  .pg { display: flex; flex-direction: column; min-height: 100vh; }
  .pg .phone-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 12px 16px; }
  .phone-head .pt { font-size: var(--fs-20); font-weight: 600; }
  .phone-head .pp { font-size: var(--fs-13); color: var(--muted); }
  .pg .phone-only { display: inline; }
  .pg .wide-only { display: none; }
  .pg .phone-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--border); background: var(--card);
    padding: 6px 4px 18px 4px; position: sticky; bottom: 0; margin-top: auto; }
  .phone-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: var(--muted);
    font-size: var(--fs-11); padding-top: 6px; }
  .phone-nav a.on { color: var(--accent); font-weight: 600; }
  .pg .wrap, .awrap { padding: 4px 12px 12px 12px; gap: 12px; }
  .talk .wrap { flex: 1; padding: 0; }
  .talk-main { background: none; border: none; min-height: 0; }
  .thread { padding: 4px 12px; gap: 12px; }
  .mine { max-width: 300px; }
  .bubble { padding: 10px 14px; line-height: 1.4; }
  .shot { width: 180px; height: 110px; }
  .shot span { left: 8px; top: 8px; font-size: var(--fs-11); }
  .reply { max-width: 330px; background: var(--card); border: 1px solid var(--border); padding: 12px 14px; font-size: var(--fs-14); }
  .understood { background: var(--blue-tint); border: none; border-radius: var(--r-10); padding: 10px 12px; gap: 4px; }
  .understood .ua { font-size: var(--fs-14); }
  .refiner-link { display: none; }
  .rnote { font-size: var(--fs-13); }
  .question { background: var(--card); padding: 12px; gap: 10px; }
  .qsub { font-size: var(--fs-13); color: var(--muted); }
  .qtext { flex: 1 1 100%; line-height: 1.3; }
  .opts { gap: 8px; }
  .opic { height: 84px; font-size: var(--fs-11); }
  .ocap { flex-direction: column; padding: 8px 10px; gap: 2px; }
  .ocap b { font-size: var(--fs-14); }
  .composer { padding: 10px 12px; gap: 8px; border-top: none; position: sticky; bottom: 68px; background: var(--page); }
  .composer .sq { width: 44px; height: 44px; }
  .composer .speak { border: none; background: var(--text); color: var(--card); }
  .composer .msg { height: 44px; padding: 0 12px; }
  .composer .send { display: none; }
  .talk-side { display: none; }
  .place .capture { min-height: 180px; }
  .pinfo { padding: 16px; }
}
