/* The approval inbox, what she may do, phone alarms, parcels and money, the house corners, the PC list (web/approvals.js caps.js alarms.js housex.js pcset.js).
   Colours come from the page's own variables, so light and dark follow the rest of the site. */
.dlg .dlg-body .caps-pane, .dlg .dlg-body .hx-pane { min-width: 0; }
.ap-list { display: grid; gap: 12px; }
.ap-card { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px; }
.ap-card.focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.ap-title { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.ap-meta { margin: 0; }
.ap-buttons { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 4px 0 0; }
.ap-buttons .btn { min-height: 44px; }
.ap-buttons .link { min-height: 44px; padding: 0 6px; }
.ap-codebox { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.ap-code { width: 6ch; min-height: 44px; font-size: 1.2rem; letter-spacing: .25em; text-align: center; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 10px; }
.ap-msg { min-height: 1.2em; margin: 0; }
.ap-flash { background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; text-align: left; overflow-wrap: anywhere; }
.warnline { color: var(--danger); }
.toasts.live-toasts { right: auto; left: 16px; }

.caps-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.caps-row, .hx-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; justify-content: space-between; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; }
.caps-row.muted, .hx-row.done { opacity: .72; }
.caps-row.edit { display: block; }
.caps-main { flex: 1 1 220px; min-width: 0; display: grid; gap: 2px; text-align: left; overflow-wrap: anywhere; }
.caps-main .sub { color: var(--muted); }
.caps-act { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; justify-content: flex-end; }
.caps-act .link, .caps-act .btn { min-height: 44px; }
.caps-sub h3 { margin: 6px 0 0; font-size: .9rem; color: var(--muted); }
.caps-sub { list-style: none; }
.caps-runs { margin: 4px 0 0; padding-left: 16px; display: grid; gap: 2px; }
.pc-cmds { margin-top: 4px; }

.hx-pane h3 { margin: 14px 0 6px; font-size: .95rem; }
.hx-sentence { font-size: 1.05rem; margin: 0 0 10px; text-align: left; }
.hx-form { display: grid; gap: 8px; margin-top: 8px; }
.hx-field { display: grid; gap: 2px; text-align: left; }
.hx-field span { color: var(--muted); font-size: .85rem; }
.hx-field input, .hx-field textarea, .alarm-form input[type=time], .alarm-form input[type=date], .alarm-form input[type=text], .alarm-form select, .tcontrols input[type=text][inputmode] {
  min-height: 44px; font-size: 16px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 10px; padding: 6px 10px; max-width: 100%; box-sizing: border-box; }
.hx-ok { background: var(--accent-soft); color: var(--accent); }
.hx-bad { background: var(--soft); color: var(--danger); }
.hx-done { background: var(--soft); }
.hx-row .pill { margin-left: 6px; }

.alarm-time { font-size: 1.05rem; }
.alarm-form { display: grid; gap: 8px; margin: 6px 0 12px; }
.alarm-days { gap: 4px 12px; }
.chipbox { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
.ring-chart .col.missed .stack .s { background: var(--danger); border-color: var(--danger); }
.ring-chart .col.snoozed .stack .s { background: var(--soft); }
.ring-chart .col.dismissed .stack .s { background: var(--accent-soft); border: 1px solid var(--accent); }

#n-approvals .badge { margin-left: auto; background: var(--accent); color: var(--accent-fg); font-weight: 600; min-width: 1.4em; text-align: center; }
@media (max-width: 480px) {
  .caps-act { justify-content: flex-start; }
  .ap-buttons .btn { flex: 1 1 40%; }
}
.dlg .ap-title { text-transform: none; letter-spacing: normal; font-size: 1rem; margin: 0; color: var(--fg); }

/* cards and quick answers under her reply in the chat (2026-10-11) */
.ap-inline { margin: 6px 0 0; max-width: 520px; }
.ap-inline:empty { display: none; }
.ap-card.ap-chat { border-color: var(--accent); }
.ap-kicker { margin: 0; text-align: left; font-weight: 600; color: var(--accent); }
.ap-inline-done { margin: 2px 0 0; text-align: left; }
.ap-hint { margin: 0; }
.msg .yesno { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; }
.msg .yesno .btn { min-height: 40px; min-width: 72px; }
#messages > .msg:not(:last-of-type) .yesno { display: none; }
/* one step ahead (web/pills.js): small rounded pills under her newest reply only */
.msg .pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; }
.msg .pills .pill { min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--accent, #8a6fd1); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.msg .pills .pill:hover:not(:disabled), .msg .pills .pill:focus-visible { background: color-mix(in srgb, var(--accent, #8a6fd1) 15%, transparent); }
.msg .pills .pill:disabled { opacity: .6; cursor: progress; }
.msg .pills .pill-done { font-size: .9em; opacity: .85; }
.msg .pills .pill-done.bad { color: var(--danger, #c0392b); }
#messages > .msg:not(:last-of-type) .pills { display: none; }
/* the key setup card under a reply (web/keycard.js) */
.msg .keycard { margin: 8px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); max-width: 520px; }
.msg .keycard-head { font-weight: 600; margin-bottom: 4px; }
.msg .keycard .fine { text-align: left; margin: 4px 0 8px; }
.msg .keycard-steps { margin: 8px 0; padding-left: 20px; }
.msg .keycard-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.msg .keycard-form input { flex: 1 1 200px; min-width: 0; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); }

/* budgets per key on the Keys screen (2026-10-11) */
.keybudget { margin: 2px 0 12px; padding: 6px 10px; border-left: 3px solid var(--line); }
.keybudget-line { margin: 0 0 6px; text-align: left; }
.keybudget-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.keybudget-row input { width: 9.5em; }
.keybudget.billing { border-left-color: var(--accent); }

/* switch cards under a reply (web/settingcards.js; manage_setting, Dream contract 2026-10-15): small toggle rows, a tap saves the switch */
.msg .setting-cards { display: grid; gap: 6px; margin: 6px 0 0; max-width: 420px; }
.msg .setting-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.msg .setting-card .sc-text { display: grid; gap: 2px; min-width: 0; }
.msg .setting-card .sc-title { font-weight: 600; overflow-wrap: anywhere; }
.msg .setting-card .sc-note { color: var(--muted); }
.msg .setting-card.locked .sc-title { opacity: .6; }
.msg .setting-card input[type=checkbox][role=switch] { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; margin: 0; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; }
.msg .setting-card input[type=checkbox][role=switch]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgb(0 0 0 / 30%); transition: transform .15s; }
.msg .setting-card input[type=checkbox][role=switch]:checked { background: var(--accent); }
.msg .setting-card input[type=checkbox][role=switch]:checked::after { transform: translateX(18px); }
.msg .setting-card input[type=checkbox][role=switch]:disabled { cursor: not-allowed; opacity: .5; }
/* "Just us" (web/us.js): the two-person chat */
.us-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow-y: auto; }
.us-msg { max-width: 80%; padding: 8px 12px; border-radius: 14px; background: var(--soft); text-align: left; }
.us-msg.mine { align-self: flex-end; background: var(--accent-soft); }
.us-msg.theirs { align-self: flex-start; }
.us-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.us-msg small { display: flex; gap: 8px; align-items: baseline; margin-top: 2px; }
.us-more { align-self: center; }
.us-form { display: flex; gap: 8px; align-items: flex-end; }
.us-form textarea { flex: 1; min-width: 0; resize: vertical; }

/* Private Session mode (web/session.js): the Stop above the composer (and inside any open dialog), the session bar, the consent card */
.session-stop { position: fixed; right: 16px; bottom: 96px; z-index: 2147483000; min-width: 64px; min-height: 44px; padding: 8px 16px; border: 0; border-radius: 22px; background: var(--danger); color: #fff; font-weight: 700; box-shadow: var(--shadow); cursor: pointer; }
.session-stop:focus-visible { outline: 3px solid var(--fg); outline-offset: 2px; }
.session-bar { margin: 0 12px 6px; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); display: flex; flex-direction: column; gap: 6px; }
.session-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.session-head { font-weight: 600; }
.session-stickers { letter-spacing: 2px; overflow-wrap: anywhere; }
.session-task { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.session-task-text { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.session-task-btns { display: flex; gap: 6px; }
.session-consent h3 { margin: 14px 0 6px; font-size: 1rem; }
.session-check { display: block; margin: 4px 0; }
.session-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
