/* ChatGPT-style mobile conversation: quiet canvas, fixed chrome, generous writing surface. */
@media (max-width:820px){
  .strategy-chat-active .shell{padding:0 0 calc(126px + env(safe-area-inset-bottom))}
  .strategy-chat-screen{min-height:100dvh;padding:0;background:var(--bg)}
  .strategy-chat-screen .chat-screen-header{position:sticky;top:0;z-index:20;min-height:58px;align-items:center;padding:calc(8px + env(safe-area-inset-top)) 16px 8px;border-bottom:1px solid color-mix(in srgb,var(--line) 72%,transparent);background:color-mix(in srgb,var(--bg) 92%,transparent);backdrop-filter:blur(18px)}
  .strategy-chat-screen .chat-screen-header h2{font-size:16px;letter-spacing:-.015em}
  .strategy-chat-screen .back-button{display:inline-flex;align-items:center;gap:3px;min-height:38px;padding:6px 0;font-size:14px;font-weight:700}
  .strategy-chat-screen .back-button .ui-icon{width:17px;height:17px}
  .strategy-chat-screen .chat-menu-shell{margin-left:auto}
  .strategy-chat-screen .chat-options-toggle{width:38px;height:38px;min-height:38px;border-radius:999px;background:transparent;border-color:transparent;color:var(--muted);letter-spacing:0}
  .strategy-chat-screen .strategy-chat-body{display:block}
  .strategy-chat-screen .strategy-chat-messages{display:flex;flex-direction:column;gap:30px;min-height:calc(100dvh - 126px);padding:32px 16px 36px;overflow:visible}
  .strategy-chat-screen .chat-bubble{max-width:100%;padding:0;border:0;border-radius:0;font-size:16px;line-height:1.6;letter-spacing:-.005em;background:transparent}
  .strategy-chat-screen .chat-bubble.user{align-self:flex-end;max-width:min(78%,520px);padding:12px 16px;border:1px solid color-mix(in srgb,var(--accent) 58%,white 42%);border-radius:16px;color:#fff;background:color-mix(in srgb,var(--accent) 92%,black 8%);box-shadow:0 3px 12px color-mix(in srgb,var(--accent) 12%,transparent)}
  .strategy-chat-screen .chat-bubble.assistant{align-self:stretch;color:var(--text)}
  .strategy-chat-screen .chat-bubble.assistant::before{content:"";display:block;width:7px;height:7px;margin:0 0 11px;border-radius:50%;background:linear-gradient(135deg,var(--accent),#9d7cff);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 10%,transparent)}
  .strategy-chat-screen .chat-bubble-actions{display:flex;align-items:center;gap:6px;margin-top:14px;padding-top:10px;border-top:1px solid color-mix(in srgb,var(--line) 70%,transparent)}
  .strategy-chat-screen .chat-bubble-actions button{min-height:28px;padding:4px 9px;border-radius:999px;background:var(--surface)}
  .strategy-chat-screen .chat-bubble-actions{opacity:0;transition:opacity .15s ease}
  .strategy-chat-screen .chat-bubble:hover .chat-bubble-actions,.strategy-chat-screen .chat-bubble:focus-within .chat-bubble-actions{opacity:1}
  .strategy-chat-screen .strategy-chat-empty{display:grid;place-items:center;flex:1;min-height:50dvh;color:var(--muted);font-size:15px;text-align:center}
  .strategy-chat-screen .strategy-chat-composer{position:fixed;z-index:30;right:12px;bottom:max(10px,env(safe-area-inset-bottom));left:12px;width:auto;margin:0;padding:8px;border:1px solid var(--line);border-radius:24px;background:color-mix(in srgb,var(--surface) 94%,transparent);box-shadow:0 8px 30px rgba(0,0,0,.14);backdrop-filter:blur(18px)}
  .strategy-chat-screen .strategy-chat-composer textarea{min-height:42px;max-height:136px;padding:10px 4px;font-size:16px;line-height:1.35}
  .strategy-chat-screen .strategy-composer-row{grid-template-columns:38px minmax(0,1fr) 40px;gap:5px}
  .strategy-chat-screen .strategy-composer-tools{padding-left:3px}
  .strategy-chat-screen .strategy-composer-mode{min-height:29px;padding:4px 11px;font-size:12px}
  .strategy-chat-screen .composer-icon-button,.strategy-chat-screen .composer-send-button{width:38px;height:38px;min-height:38px}
  .strategy-chat-screen .composer-send-button{width:40px;height:40px}
  .strategy-chat-screen .strategy-attachment-tray{padding:0 3px 4px}
  .strategy-chat-screen .chat-message-row{display:flex;flex-direction:column;width:100%;gap:4px}
  .strategy-chat-screen .chat-message-row.user{align-items:flex-end}
  .strategy-chat-screen .chat-message-row.assistant{align-items:flex-start}
  .strategy-chat-screen .chat-message-row .chat-bubble-actions{display:flex;align-items:center;gap:5px;margin:0;padding:0;border:0;opacity:1}
  .strategy-chat-screen .chat-message-row.user .chat-bubble-actions{padding-right:4px}
  .strategy-chat-screen .chat-message-row.user .chat-bubble-actions button{display:grid;place-items:center;width:30px;height:26px;min-height:26px;padding:0;border:0;border-radius:8px;color:var(--muted);background:transparent}
  .strategy-chat-screen .chat-message-row.user .chat-bubble-actions button:hover{color:var(--text);background:var(--soft-bg)}
  .strategy-chat-screen .chat-message-row.user .chat-bubble-actions .ui-icon{width:15px;height:15px;stroke-width:1.7}
  .strategy-chat-screen .chat-message-row.assistant .chat-bubble-actions{align-self:flex-start}
  .strategy-chat-screen .chat-message-row.assistant .chat-bubble-actions button{display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:4px 9px;border:0;border-radius:8px;color:var(--muted);background:transparent}
  .strategy-chat-screen .chat-message-row.assistant .chat-bubble-actions button[data-assistant-action="copy"]{width:30px;padding:0;justify-content:center}
  .strategy-chat-screen .chat-message-row.assistant .chat-bubble-actions button:hover{color:var(--text);background:var(--soft-bg)}
  .strategy-chat-screen .chat-message-row.assistant .chat-bubble-actions .ui-icon{width:15px;height:15px;stroke-width:1.7}
  .strategy-chat-screen .chat-message-row.assistant .chat-bubble-actions button.copied{color:var(--accent)}
}
