/* Jarvis — chat sheet (voice, receipts, thinking). Only design tokens from app.css. */
.jbg { animation: fi .18s; }
.sheet.jsheet { height: min(88vh, 100dvh - 24px); display: flex; flex-direction: column; overflow: hidden; padding-bottom: calc(10px + env(safe-area-inset-bottom)); animation: jup .32s cubic-bezier(.2,.9,.25,1.05); transition: transform .18s ease-out; will-change: transform; }
@keyframes jup { from { transform: translateY(60px) scale(.98); opacity: 0; } }
@media (min-width: 700px) { .sheet.jsheet { height: min(80vh, 760px); animation: jpop .22s cubic-bezier(.2,.9,.3,1.1); } @keyframes jpop { from { transform: translateY(14px) scale(.97); opacity: 0; } } }
.jsheet .grab { touch-action: none; width: 44px; height: 5px; margin: 0 auto 10px; }
.jsheet .hd { touch-action: pan-x; margin-bottom: 6px; }
.jsheet .hd .orb { transition: transform .3s; }
.jsheet .hd .orb.busy { animation: pulse 1.1s infinite; transform: scale(1.08); }
.jsheet .hd .orb.ear { animation: ear 1.2s infinite; }
@keyframes ear { 50% { transform: scale(1.18); box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 22%, transparent); } }
.jsheet .jclr { padding: 6px 10px; border-radius: 999px; background: var(--bg3); color: var(--fg2); }
.jsheet .jx { width: 32px; height: 32px; border-radius: 50%; background: var(--bg3); color: var(--fg2); font-size: 14px; display: grid; place-items: center; flex: none; }

/* options chips */
.jopts { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 8px; margin: 0 -2px; }
.jopts::-webkit-scrollbar, .chat .sugg::-webkit-scrollbar { display: none; }
.jopts .chip { white-space: nowrap; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--fg3); background: var(--bg2); transition: all .15s; }
.jopts .chip.on { border-color: transparent; background: color-mix(in srgb, var(--accent) 14%, var(--bg2)); color: var(--accent); }

/* messages */
.jsheet .chat { flex: 1; min-height: 0; }
.jsheet .chat .msgs { padding: 4px 2px 10px; overscroll-behavior: contain; }
.jsheet .msg { position: relative; animation: jin .18s ease-out; font-size: 15px; }
@keyframes jin { from { transform: translateY(6px); opacity: 0; } }
.jsheet .msg.u { background: var(--accent); }
.jsheet .msg.j.err { background: color-mix(in srgb, var(--danger) 10%, var(--bg3)); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }
.jsheet .msg .mt { white-space: pre-wrap; }
.jsheet .msg .retry { margin-top: 8px; padding: 7px 14px; border-radius: 999px; background: var(--danger); color: #fff; font-weight: 700; font-size: 13px; }
.jsheet .msg .spk { position: absolute; right: -34px; bottom: 4px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: var(--fg3); opacity: .55; transition: opacity .15s, background .15s; }
.jsheet .msg .spk:hover, .jsheet .msg .spk:active { opacity: 1; background: var(--bg3); }
.jsheet .msg.j { max-width: 88%; margin-right: 34px; }

/* thinking */
.jsheet .msg.think { display: flex; align-items: center; gap: 10px; font-style: normal; padding: 12px 16px; }
.jsheet .dots { display: inline-flex; gap: 5px; }
.jsheet .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--fg3); animation: jdot 1.2s infinite ease-in-out; }
.jsheet .dots i:nth-child(2) { animation-delay: .15s; } .jsheet .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes jdot { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-5px); opacity: 1; } }
.jsheet .slow { font-size: 12px; color: var(--fg3); font-style: italic; animation: fi .4s; }

/* receipts */
.jsheet .msg .acts { gap: 6px; margin-top: 10px; }
.jsheet .rc { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13px; color: var(--fg); font-weight: 500; transition: opacity .25s; }
.jsheet .rc .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; background: color-mix(in srgb, var(--ok) 14%, var(--bg2)); flex: none; }
.jsheet .rc .t { font-weight: 700; line-height: 1.3; }
.jsheet .rc .s { font-size: 12px; color: var(--fg2); margin-top: 1px; }
.jsheet .rc .s.ue { color: var(--danger); }
.jsheet .rc .un { flex: none; padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--bg2)); }
.jsheet .rc .un:disabled { opacity: .5; }
.jsheet .rc .done { flex: none; font-size: 11px; font-weight: 700; color: var(--fg3); text-transform: uppercase; letter-spacing: .06em; }
.jsheet .rc.undone { opacity: .55; }
.jsheet .rc.undone .t, .jsheet .rc.undone .s { text-decoration: line-through; }
.jsheet .rc.undone .ic { background: var(--bg3); filter: grayscale(1); }
.jsheet .rc.err { border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); font-weight: 600; }
.jsheet .rc.err .ic { background: color-mix(in srgb, var(--danger) 14%, var(--bg2)); color: var(--danger); font-weight: 800; }

/* suggestions + input */
.jsheet .chat .sugg { padding: 6px 0 8px; margin: 0 -2px; }
.jsheet .chat .sugg button { border: 1px solid var(--line); background: var(--bg2); color: var(--fg2); font-weight: 600; transition: background .15s; }
.jsheet .chat .sugg button:active { background: var(--bg3); }
.jsheet .chat .in { gap: 8px; padding-top: 10px; }
.jsheet .chat .in textarea { font-size: 16px; line-height: 1.35; min-height: 46px; max-height: 140px; height: 46px; resize: none; padding: 12px 16px; border-radius: 23px; overflow-y: auto; }
.jsheet .send:disabled { opacity: .45; filter: grayscale(.6); }
.jsheet .mic { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--bg3); color: var(--fg2); position: relative; transition: background .2s, color .2s; }
.jsheet .mic svg { width: 22px; height: 22px; }
.jsheet .mic:disabled { opacity: .4; }
.jsheet .mic.on { background: var(--danger); color: #fff; animation: micpulse 1.3s infinite; }
.jsheet .mic.on::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--danger); opacity: 0; animation: ring 1.3s infinite; }
@keyframes micpulse { 50% { transform: scale(1.06); } }
@keyframes ring { from { transform: scale(.85); opacity: .7; } to { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .jsheet, .jsheet *, .jsheet *::after { animation: none !important; transition: none !important; } }
