/* Mobile layout (<= 700px): Core + chat home, everything else behind the menu.
   Desktop is untouched: every rule here is inside the media query except the
   .m-only default (hidden). */
.m-only { display: none; }
.m-only[hidden] { display: none !important; }

@media (max-width: 700px) {
    html, body { height: 100dvh; }
    body { height: 100dvh; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
    #header, #nav, #nav-backdrop, #nav-toggle { display: none !important; }
    .skip-link { z-index: 90; }
    #auth-gate { z-index: 80; }     /* pairing/login covers the bar and menu */

    /* ---------- top bar ---------- */
    .m-bar { display: flex; align-items: center; gap: 6px; flex-shrink: 0; position: relative; z-index: 52;
        padding: env(safe-area-inset-top) 10px 0 12px; min-height: calc(58px + env(safe-area-inset-top)); box-sizing: border-box;
        background: rgba(5, 14, 22, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--j-line); }
    .m-bar-stop { background: linear-gradient(180deg, rgba(80, 14, 28, .92), rgba(5, 14, 22, .9)); border-bottom-color: rgba(255, 107, 120, .6); }
    .m-brand { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
    .m-brand[hidden], .m-title[hidden], .m-back[hidden] { display: none; }
    .m-word { font-family: var(--j-font-display); font-weight: 700; font-size: 16px; letter-spacing: .34em; color: var(--j-cyan-hi); text-shadow: 0 0 14px rgba(83, 222, 217, .55); line-height: 1.15; }
    .m-status { display: flex; align-items: center; gap: 7px; font-size: 12px; letter-spacing: .05em; color: var(--j-text-2); font-weight: 600; }
    .m-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--j-text-3); flex-shrink: 0; }
    .m-status[data-tone="ok"] .m-dot { background: var(--j-ok); box-shadow: 0 0 8px var(--j-ok); }
    .m-status[data-tone="warn"] .m-dot { background: var(--j-amber); box-shadow: 0 0 8px var(--j-amber); } .m-status[data-tone="warn"] { color: var(--j-gold); }
    .m-status[data-tone="bad"] .m-dot { background: var(--j-red); box-shadow: 0 0 8px var(--j-red); } .m-status[data-tone="bad"] { color: #ffb3bb; }
    .m-back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 10px 0 4px; color: var(--j-cyan-hi); text-decoration: none; font-weight: 600; font-size: 15px; border-radius: 12px; }
    .m-back:active { background: rgba(83, 222, 217, .12); }
    .m-title { flex: 1; min-width: 0; margin: 0; font-family: var(--j-font-display); font-weight: 600; font-size: 14px; letter-spacing: .16em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .m-menu-btn { position: relative; width: 48px; height: 48px; padding: 0; display: grid; place-items: center; border-radius: 14px; flex-shrink: 0; background: rgba(14, 38, 54, .8); border: 1px solid var(--j-line-hi); color: var(--j-text); }
    .m-menu-btn[aria-expanded="true"] { background: rgba(83, 222, 217, .18); border-color: var(--j-cyan); }
    .m-menu-btn.needs { border-color: rgba(255, 90, 110, .75); }
    .m-badge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
        border-radius: 11px; background: var(--j-alert); color: #fff; font: 800 12.5px/1 var(--j-font-ui); border: 2px solid var(--j-bg); box-shadow: 0 0 12px rgba(215, 38, 61, .65); animation: m-badge-pulse 2.4s ease-in-out infinite; }
    .m-badge[hidden] { display: none; }
    @keyframes m-badge-pulse { 50% { box-shadow: 0 0 0 5px rgba(215, 38, 61, .0), 0 0 18px rgba(215, 38, 61, .9); } }

    /* ---------- menu sheet ---------- */
    .m-scrim { position: fixed; inset: 0; z-index: 49; background: rgba(2, 6, 10, .62); opacity: 0; transition: opacity .2s; display: block; }
    .m-scrim.in { opacity: 1; }
    .m-sheet { position: fixed; z-index: 50; left: 0; right: 0; top: calc(58px + env(safe-area-inset-top)); display: block; max-height: calc(100dvh - 58px - env(safe-area-inset-top) - 10px); overflow-y: auto; overscroll-behavior: contain;
        padding-bottom: calc(10px + env(safe-area-inset-bottom)); background: rgba(5, 15, 24, .985); border-bottom: 1px solid var(--j-line-hi); border-radius: 0 0 22px 22px;
        box-shadow: 0 22px 50px rgba(0, 0, 0, .65), 0 0 40px rgba(83, 222, 217, .08); opacity: 0; transform: translateY(-14px); transition: opacity .2s var(--j-ease), transform .22s var(--j-ease); outline: none; }
    .m-sheet.in { opacity: 1; transform: none; }
    body.m-sheet-open { overflow: hidden; }
    .m-sheet-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 4px 16px; }
    .m-sheet-head h2 { font-family: var(--j-font-display); font-size: 13px; letter-spacing: .26em; text-transform: uppercase; color: #bfeff0; margin: 0; }
    .m-summary { flex: 1; font-size: 12.5px; font-weight: 700; color: #ff8a98; letter-spacing: .04em; }
    .m-close { width: 48px; height: 48px; display: grid; place-items: center; background: transparent; border-color: transparent; border-radius: 14px; color: var(--j-text-2); padding: 0; }
    .m-safety { padding: 4px 12px 12px; display: grid; gap: 8px; border-bottom: 1px solid var(--j-line); }
    .m-stopped { margin: 0; padding: 9px 12px; border-radius: 12px; border: 1px solid rgba(255, 107, 120, .6); background: rgba(120, 20, 36, .4); color: #ffd0d5; font-size: 13.5px; line-height: 1.35; }
    .m-safety-row { display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; }
    .m-estop, .m-pause { min-height: 52px; border-radius: 14px; font-size: 15px; font-weight: 800; letter-spacing: .1em; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
    .m-estop { color: #fff; border: 1px solid #ff8a98; background: linear-gradient(180deg, #c42a42, #8e1a2e); box-shadow: 0 0 22px rgba(215, 38, 61, .45), inset 0 1px 0 rgba(255, 255, 255, .25); }
    .m-estop:hover:not(:disabled) { box-shadow: 0 0 28px rgba(255, 70, 90, .7); }
    .m-estop:disabled { background: rgba(90, 20, 32, .6); color: #ffb3bb; box-shadow: none; opacity: 1; }
    .m-pause { letter-spacing: .06em; font-weight: 700; }
    .m-pause-clear { color: #ffd0d5; border-color: rgba(255, 107, 120, .8); background: rgba(120, 20, 36, .45); }
    .m-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--j-line); border-radius: 14px; overflow: hidden; }
    .m-mode { min-height: 46px; border: 0; border-radius: 0; background: rgba(255, 255, 255, .02); color: var(--j-text-2); font-size: 14px; font-weight: 600; }
    .m-mode + .m-mode { border-left: 1px solid var(--j-line); }
    .m-mode.on { background: linear-gradient(180deg, rgba(83, 222, 217, .28), rgba(35, 126, 133, .22)); color: var(--j-cyan-hi); box-shadow: inset 0 -2px 0 var(--j-cyan); }
    .m-list { list-style: none; margin: 0; padding: 4px 8px; }
    .m-item { display: grid; grid-template-columns: 38px 1fr auto 14px; align-items: center; gap: 12px; min-height: 58px; padding: 8px 8px 8px 8px; border-radius: 14px; text-decoration: none; color: var(--j-text); }
    .m-item:active, .m-item:hover { background: rgba(83, 222, 217, .09); }
    .m-item-ico { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: rgba(83, 222, 217, .09); border: 1px solid var(--j-line); color: var(--j-cyan); }
    .m-item-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
    .m-item-txt strong { font-size: 16px; font-weight: 600; } .m-item-txt small { font-size: 12.5px; color: var(--j-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .m-item-alert { background: rgba(215, 38, 61, .10); box-shadow: inset 3px 0 0 var(--j-alert); }
    .m-item-alert .m-item-ico { color: #ff8a98; border-color: rgba(255, 107, 120, .45); background: rgba(215, 38, 61, .14); }
    .m-count { min-width: 26px; height: 26px; padding: 0 8px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; font-size: 13px; font-weight: 800; }
    .m-count[hidden] { display: none; }
    .m-count-alert { background: var(--j-alert); color: #fff; box-shadow: 0 0 12px rgba(215, 38, 61, .5); }
    .m-count-info { background: rgba(83, 222, 217, .14); color: var(--j-cyan-hi); border: 1px solid var(--j-line-hi); }
    .m-chev { color: var(--j-text-3); display: grid; place-items: center; }

    /* ---------- sub-views: full screen ---------- */
    #main { padding: 14px 14px calc(18px + env(safe-area-inset-bottom)); }
    #main > .view-command { max-width: none; }
    body.route-home #voice-session { display: none; }
    #voice-session { padding: 6px 12px; flex-wrap: wrap; }
    .view-head h1, .hud-heading { display: none; }          /* the top bar already carries the title */
    .talk-dock { bottom: calc(4px + env(safe-area-inset-bottom)); }

    /* ---------- HOME: Core + chat ---------- */
    body.route-home #main { padding: 0; overflow: hidden; }
    body.route-home #main > .mh { flex: 1 1 0; min-height: 0; max-width: none; display: flex; flex-direction: column; }
    .mh-core { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 4px 12px 0;
        background: radial-gradient(70% 60% at 50% 38%, rgba(24, 90, 110, .26), transparent 72%); }
    .mh .jarvis-core { min-width: 0; width: min(86vw, 39dvh, 350px); transition: width .32s var(--j-ease); }
    .mh-caption { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: -4px; min-height: 44px; }
    .mh-caption h2 { font-family: var(--j-font-display); font-size: 15px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; margin: 0; padding-left: .26em; text-shadow: 0 0 16px rgba(83, 222, 217, .45); }
    .mh[data-state="needs-you"] .mh-caption h2 { color: #ffc29f; text-shadow: 0 0 16px rgba(255, 143, 90, .55); }
    .mh[data-state="thinking"] .mh-caption h2, .mh[data-state="executing"] .mh-caption h2 { color: var(--j-gold); text-shadow: 0 0 16px rgba(255, 190, 92, .5); }
    .mh[data-state="error"] .mh-caption h2 { color: #ff9aa5; text-shadow: none; } .mh[data-state="offline"] .mh-caption h2, .mh[data-state="paused"] .mh-caption h2 { text-shadow: none; }
    .mh-detail { margin: 0; font-size: 13px; color: var(--j-text-2); }
    .mh-cta { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; padding: 0 20px; border-radius: 99px; text-decoration: none; font-weight: 800; font-size: 14.5px; letter-spacing: .04em;
        color: #fff; background: linear-gradient(180deg, #e0722f, #b3501c); border: 1px solid #ffb88f; box-shadow: 0 0 24px rgba(255, 143, 90, .45); }
    .mh-cta, .mh-cta[hidden] { display: none; }   /* the Jarvis Activity card is the call to action now */
    .mh-pill { min-height: 44px; padding: 0 18px; border-radius: 99px; }
    .mh .jarvis-core canvas { position: absolute; left: 0; top: 0; }   /* the box (aspect-ratio) sizes the core, not the canvas, so it can shrink */
    .mh.typing .jarvis-core { width: min(34vw, 17dvh, 140px); }
    .mh.typing .mh-detail, .mh.typing .mh-cta { display: none; } .mh.typing .mh-caption { min-height: 0; margin-top: 0; }
    .mh.typing .mh-caption h2 { font-size: 12px; }


    /* ---------- Jarvis Activity card (between the Core and the chat) ---------- */
    .ac { flex: 0 0 auto; position: relative; margin: 6px 12px 4px; border-radius: 20px; border: 1px solid var(--j-line-hi); overflow: hidden;
        background: linear-gradient(165deg, rgba(14, 40, 56, .72), rgba(6, 17, 27, .92) 62%); box-shadow: 0 8px 26px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(154, 245, 240, .07); }
    .ac-main { display: block; box-sizing: border-box; min-height: 44px; padding: 10px 14px 11px; color: var(--j-text); text-decoration: none; -webkit-tap-highlight-color: transparent; }
    .ac-main:active { background: rgba(83, 222, 217, .07); }
    .ac-main:focus-visible, .ac-more:focus-visible { outline: 2px solid var(--j-cyan-hi); outline-offset: -3px; border-radius: 18px; }
    .ac-head { display: flex; align-items: center; gap: 9px; }
    .ac-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; color: var(--j-cyan); background: rgba(83, 222, 217, .1); border: 1px solid var(--j-line-hi); }
    .ac-name { flex: 1; min-width: 0; font-family: var(--j-font-display); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #bfeff0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ac-pill { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px 0 7px; border-radius: 13px; font-size: 12px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; flex-shrink: 0;
        color: var(--j-text-2); background: rgba(157, 184, 196, .1); border: 1px solid rgba(157, 184, 196, .35); }
    .ac-pill-ico { display: grid; place-items: center; }
    .ac[data-tone="ok"] .ac-pill { color: #7ef0b4; background: rgba(63, 217, 138, .12); border-color: rgba(63, 217, 138, .5); }
    .ac[data-tone="info"] .ac-pill { color: var(--j-gold); background: rgba(255, 190, 92, .11); border-color: rgba(255, 190, 92, .5); }
    .ac[data-tone="warn"] .ac-pill { color: var(--j-gold); background: rgba(255, 190, 92, .13); border-color: rgba(255, 190, 92, .6); }
    .ac[data-tone="bad"] .ac-pill { color: #ffb3bb; background: rgba(255, 107, 120, .13); border-color: rgba(255, 107, 120, .6); }
    .ac[data-tone="alert"] .ac-pill { color: #fff; background: #b84a1c; border-color: #ffb88f; }
    .ac-chev { color: var(--j-text-2); display: grid; place-items: center; margin-right: -3px; }
    .ac-sub { margin-top: 7px; display: flex; align-items: center; justify-content: space-between; }
    .ac-label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--j-text-2); }
    .ac-title { margin: 1px 0 0; font-family: var(--j-font-ui); font-weight: 600; font-size: 17px; line-height: 1.25; color: var(--j-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
    .ac-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 13px; color: var(--j-text-2); }
    .ac-meta[hidden] { display: none; }
    .ac-meta-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
    .ac-step { flex-shrink: 0; font-variant-numeric: tabular-nums; }
    .ac-bar { position: relative; height: 6px; margin-top: 8px; border-radius: 3px; overflow: hidden; background: rgba(157, 184, 196, .18); }
    .ac-bar[hidden] { display: none; }
    .ac-bar > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--j-cyan-dim), var(--j-cyan)); box-shadow: 0 0 10px rgba(83, 222, 217, .5); transition: width .5s var(--j-ease); }
    .ac-bar.indet > i { width: 38%; animation: ac-slide 1.9s var(--j-ease) infinite; }
    .ac-bar.still > i { width: 38%; opacity: .55; background: var(--j-text-3); box-shadow: none; }
    @keyframes ac-slide { 0% { left: -40%; } 100% { left: 102%; } }
    .ac-line { margin: 7px 0 0; font-size: 13.5px; line-height: 1.3; color: var(--j-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ac-line[hidden] { display: none; }
    .ac.has-more .ac-line { padding-right: 84px; }
    .ac-more { position: absolute; right: 6px; bottom: 0; min-height: 44px; min-width: 44px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: flex-end; font-size: 13px; font-weight: 700; color: var(--j-cyan-hi); text-decoration: none; }
    .ac-more[hidden] { display: none; }
    /* states */
    .ac[data-state="needs"] { border-color: rgba(255, 143, 90, .75); background: linear-gradient(165deg, rgba(74, 34, 14, .62), rgba(8, 20, 30, .94) 64%); box-shadow: 0 0 0 1px rgba(255, 143, 90, .22), 0 8px 26px rgba(0, 0, 0, .35), 0 0 26px rgba(255, 143, 90, .18); }
    .ac[data-state="needs"]::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 3px 3px 0; background: var(--j-coral); }
    .ac[data-state="needs"] .ac-label { color: #ffc29f; } .ac[data-state="needs"] .ac-ico { color: #ffc29f; border-color: rgba(255, 143, 90, .55); background: rgba(255, 143, 90, .14); }
    .ac[data-state="needs"] .ac-line { color: #ffd6bf; font-weight: 600; }
    .ac[data-state="stopped"], .ac[data-state="hold"] { border-color: rgba(255, 107, 120, .6); background: linear-gradient(165deg, rgba(70, 14, 26, .55), rgba(8, 18, 28, .94) 64%); }
    .ac[data-state="stopped"] .ac-ico, .ac[data-state="hold"] .ac-ico { color: #ffb3bb; border-color: rgba(255, 107, 120, .5); background: rgba(255, 107, 120, .12); }
    .ac[data-state="paused"] { border-color: rgba(255, 190, 92, .5); } .ac[data-state="paused"] .ac-ico { color: var(--j-gold); border-color: rgba(255, 190, 92, .45); background: rgba(255, 190, 92, .1); }
    .ac[data-state="offline"] { opacity: .88; } .ac[data-state="offline"] .ac-ico { color: var(--j-text-2); }
    .ac[data-state="idle"] .ac-title { color: var(--j-text); }
    .ac[data-state="idle"] .ac-line { margin-top: 5px; }
    /* keyboard up: collapse to a single compact row so the composer keeps its room */
    .ac[data-state="needs"] .ac-bar { display: none; }
    @media (max-width: 380px) { .ac-ico { display: none; } }
    .mh.typing .ac-sub, .mh.typing .ac-meta, .mh.typing .ac-bar, .mh.typing .ac-line, .mh.typing .ac-more { display: none; }
    .mh.typing .ac { margin-top: 2px; } .mh.typing .ac-title { -webkit-line-clamp: 1; margin-top: 4px; font-size: 15px; }

    .mh-chat { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
    .mh-chat .chat-layout { margin: 0; height: 100%; max-width: none !important; background: transparent; }
    .mh-chat #chat-view { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px); mask-image: linear-gradient(to bottom, transparent 0, #000 22px); scrollbar-width: none; overscroll-behavior: contain; }
    .mh-chat #chat-view::-webkit-scrollbar { display: none; }
    .mh-chat #messages { padding: 14px 0 8px; gap: 8px; margin-top: auto; }
    .mh-chat .message { padding: 0 14px; }
    .mh-chat .avatar, .mh-chat .timestamp, .mh-chat #divider, .mh-chat .chat-note, .mh-chat .thread-steps, .mh-chat .empty-logo { display: none; }
    .mh-chat .bubble-col { max-width: 88%; }
    .mh-chat .bubble { font-family: var(--j-font-body); font-size: 15px; line-height: 1.45; padding: 9px 14px; border-radius: 18px; white-space: normal; }
    .mh-chat .user-bubble { background: rgba(83, 222, 217, .17); border-color: rgba(83, 222, 217, .38); border-bottom-right-radius: 6px; }
    .mh-chat .jarvis-bubble { background: rgba(12, 34, 49, .88); border-color: rgba(83, 222, 217, .16); border-bottom-left-radius: 6px; }
    .mh-chat .jarvis-bubble::before { display: none; }
    .mh-chat .bubble p { margin: 0 0 .5em; } .mh-chat .bubble p:last-child { margin-bottom: 0; }
    .mh-chat .thread-state { font-size: 13px; color: var(--j-gold); margin: 0; } .mh-chat .thread-activity { font-size: 12.5px; }
    .mh-chat .system-message { font-style: normal; font-size: 12.5px; color: #ffb3bb; }
    .mh-chat #empty-state { flex: 0 0 auto; padding: 14px 24px; gap: 4px; margin: auto 0; }
    .mh-chat .empty-title { font-size: 15px; } .mh-chat .empty-subtitle { font-size: 13px; line-height: 1.4; }
    .mh-chat #input-bar { height: auto; gap: 8px; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(5, 14, 22, .9); border-top: 1px solid var(--j-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
    .mh-chat .input-wrapper { height: 50px; border-radius: 25px; padding: 0 18px; background: rgba(3, 10, 17, .75); border: 1px solid var(--j-line-hi); }
    .mh-chat #message-input { font-size: 16px; font-family: var(--j-font-body); min-height: 24px; }
    .mh-chat #send-btn, .mh-chat .mh-mic { width: 50px; height: 50px; }
    .mh-chat #send-btn { border-color: var(--j-line-hi); color: var(--j-cyan-hi); background: rgba(83, 222, 217, .12); }
    .mh-mic { border-radius: 50%; padding: 0; display: grid; place-items: center; flex-shrink: 0; color: #062b2e; border: 1px solid var(--j-cyan-hi);
        background: radial-gradient(circle at 35% 30%, #b8fbf7, var(--j-cyan) 62%, #2aa8a6); box-shadow: 0 0 22px rgba(83, 222, 217, .5); }
    .mh-chat .mh-mic.talk-button { min-width: 0; min-height: 0; letter-spacing: 0; font-size: 0; }
    .mh-mic:hover:not(:disabled) { box-shadow: 0 0 30px rgba(83, 222, 217, .8); }
    .mh-mic.on { background: radial-gradient(circle at 35% 30%, #ffe3b0, var(--j-amber) 62%, #d98a1c); border-color: var(--j-gold); box-shadow: 0 0 0 0 rgba(255, 190, 92, .6); animation: m-mic-ring 1.6s ease-out infinite; }
    .mh-mic:disabled { opacity: .45; box-shadow: none; filter: grayscale(.5); }
    @keyframes m-mic-ring { to { box-shadow: 0 0 0 14px rgba(255, 190, 92, 0); } }

    /* needs-you panel */
    .needs-view-list { display: flex; flex-direction: column; gap: 12px; }
    .needs-view .needs-card { padding: 16px; border-color: rgba(255, 143, 90, .45); background: linear-gradient(160deg, rgba(60, 28, 14, .55), rgba(8, 22, 34, .9) 55%); }
    .needs-view .needs-q { font-size: 19px; }
    .needs-view .choice { min-height: 48px; flex: 1 1 40%; }
    .needs-view .answer-row { flex-direction: column; } .needs-view .answer-row input, .needs-view .answer-row button { min-height: 48px; font-size: 16px; }
    .needs-view .choice-row button { font-size: 15px; }
    .needs-allclear { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 40px 12px; }
    .needs-allclear-ico { color: var(--j-ok); } .needs-allclear h2 { font-family: var(--j-font-display); letter-spacing: .2em; font-size: 16px; margin: 6px 0 0; text-transform: uppercase; } .needs-allclear p { color: var(--j-text-2); margin: 0 0 14px; }
    .mh-primary { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 30px; border-radius: 99px; text-decoration: none; font-weight: 700; font-size: 16px; color: #062b2e; background: radial-gradient(circle at 35% 30%, #b8fbf7, var(--j-cyan) 62%, #2aa8a6); box-shadow: 0 0 22px rgba(83, 222, 217, .45); }
    .needs-more { align-self: center; display: inline-flex; align-items: center; min-height: 44px; color: var(--j-cyan); font-size: 14px; }
    #toasts { left: 12px; right: 12px; bottom: calc(86px + env(safe-area-inset-bottom)); max-width: none; }
}
@media (max-width: 700px) and (max-height: 640px) { .mh .jarvis-core { width: min(60vw, 34dvh, 240px); } }
@media (prefers-reduced-motion: reduce) { .m-sheet, .m-scrim, .mh .jarvis-core, .ac-bar > i { transition: none !important; } .m-badge, .mh-mic.on { animation: none !important; }
    .ac-bar.indet > i { animation: none !important; left: 0; width: 100%; opacity: .45; background: repeating-linear-gradient(90deg, var(--j-cyan-dim) 0 8px, transparent 8px 14px); box-shadow: none; } }
