.bushi-consult{--bc-viewport-height:100dvh;position:fixed;inset:0;margin:auto;width:min(740px,calc(100vw - 48px));height:min(820px,calc(100dvh - 72px));max-width:none;max-height:none;padding:0;border:1px solid #ffffff14;border-radius:28px;background:#101214;color:#f4f5f6;box-shadow:0 32px 100px #0008;overflow:hidden;font:400 16px/1.6 -apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC","Microsoft YaHei",sans-serif;color-scheme:dark}
.bushi-consult::backdrop{background:#0507089c;backdrop-filter:blur(12px)}
.bushi-consult .is-assistant .bc-message-content{white-space:normal;overflow-wrap:anywhere}
.bushi-consult .bc-message-content :is(p,ul,ol,pre){margin:0 0 14px}
.bushi-consult .bc-message-content :is(h3,h4){margin:22px 0 10px;color:inherit;font-size:17px;font-weight:650;line-height:1.5;letter-spacing:0}
.bushi-consult .bc-message-content :is(h3,h4):first-child{margin-top:0}
.bushi-consult .bc-message-content :is(ul,ol){padding-left:22px}
.bushi-consult .bc-message-content li{margin:5px 0}
.bushi-consult .bc-message-content pre{padding:12px;border-radius:10px;background:#ffffff08;white-space:pre-wrap;overflow-wrap:anywhere}
.bushi-consult .bc-message-content code{font-family:ui-monospace,monospace;font-size:.93em;white-space:pre-wrap}
.bushi-consult .bc-message-content strong{font-weight:650;color:#eef5f2}
.bushi-consult .bc-message-content>:last-child{margin-bottom:0}
.bushi-consult-open{overflow:hidden}
.bushi-consult[open]{animation:bc-appear .24s ease-out}
.bushi-consult *, .bushi-consult *::before,.bushi-consult *::after{box-sizing:border-box}
.bushi-consult button,.bushi-consult textarea{font:inherit}
.bushi-consult button{min-height:44px;cursor:pointer;-webkit-tap-highlight-color:transparent}
.bushi-consult svg,#bushiConsultButton svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.bushi-consult [hidden]{display:none!important}
.bushi-consult-panel{height:100%;display:flex;flex-direction:column;min-height:0}
.bc-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:24px 26px 18px;border-bottom:1px solid #ffffff10;flex:none}
.bc-eyebrow{display:block;color:#a8dfd0;font-size:12px;letter-spacing:.06em;font-weight:600}
.bc-header h2{margin:2px 0 5px;font-size:25px;font-weight:700;letter-spacing:-.6px}
.bc-header p{margin:0;font-size:12px;color:#c0c6cb;overflow-wrap:anywhere}
.bc-mode-section{flex:none;padding:0 26px 12px;background:#141719;border-bottom:1px solid #ffffff0b}
.bc-mode-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;color:#aeb9bf;font-size:12px}
.bc-mode-heading button{border:0;background:none;color:#a8dfd0;padding:0 2px;font-size:12px;min-width:64px}
.bc-modes{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.bc-modes button{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;min-height:60px;padding:10px 14px;border:1px solid #ffffff13;border-radius:14px;background:#1c1f22;color:#f4f5f6;text-align:left;transition:background .16s,border-color .16s}
.bc-modes strong{font-size:14px;line-height:1.4;font-weight:650}
.bc-modes button>span{font-size:11px;color:#c0c6cb;line-height:1.4}
.bc-modes button[aria-pressed=true]{background:#243d34;border-color:#a8dfd065}
.bc-modes button[aria-pressed=true] strong{color:#c4f3e5}
.bc-modes button:hover{background:#28312d}
.bc-icon-button{display:grid;place-items:center;width:44px;height:44px;flex:none;background:#25292d;border:0;border-radius:50%;color:#d5dcdf}
.bc-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:20px 26px;scrollbar-width:thin}
.bc-context{background:#1c1f22;border:1px solid #ffffff0a;border-radius:14px;padding:0 16px;margin:0 0 20px}
.bc-context summary{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;font-size:13px;color:#c0c6cb;list-style:none}
.bc-context summary::-webkit-details-marker{display:none}
.bc-context summary::after{content:"";width:7px;height:7px;border-right:1.8px solid currentColor;border-bottom:1.8px solid currentColor;transform:rotate(45deg);margin-right:3px;transition:transform .2s}
.bc-context[open] summary::after{transform:rotate(225deg)}
.bc-context p{margin:0 0 10px;color:#c0c6cb;font-size:13px;overflow-wrap:anywhere}
.bc-welcome,.bc-empty{padding:26px 0 32px;text-align:center}
.bc-orb{display:grid;place-items:center;width:64px;height:64px;margin:0 auto 17px;border-radius:22px;background:linear-gradient(145deg,#2e4841,#1b2a27);color:#a8dfd0;box-shadow:inset 0 1px 0 #ffffff0a}
.bc-orb svg{width:30px;height:30px}
.bc-welcome h3,.bc-empty h3{font-size:22px;line-height:1.35;letter-spacing:-.4px;margin:0 0 10px}
.bc-welcome p,.bc-empty p{font-size:14px;max-width:380px;margin:0 auto 23px;color:#c0c6cb}
.bc-prompts{display:grid;gap:10px;max-width:400px;margin:0 auto}
.bc-prompts button{width:100%;background:#1c1f22;border:1px solid #ffffff0d;color:#e9eeec;border-radius:14px;padding:12px 16px;text-align:left;font-size:14px;transition:background .15s,transform .15s}
.bc-prompts button:hover{background:#29312f}
.bc-prompts button:active{transform:scale(.985)}
.bc-message{max-width:94%;margin:18px 0 24px}
.bc-message-author{display:block;color:#a8dfd0;font-size:12px;font-weight:650;margin:0 0 6px}
.bc-message-content{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;font-size:15px}
.bc-message.is-user{margin-left:auto;max-width:88%}
.bc-message.is-user .bc-message-author{text-align:right;color:#c0c6cb}
.bc-message.is-user .bc-message-content{background:#283b35;border-radius:18px 18px 5px 18px;padding:12px 16px;color:#eaf4ef}
.bc-thinking{display:flex;align-items:center;gap:10px;margin:18px 0;color:#c0c6cb;font-size:13px}
.bc-thinking span{width:9px;height:9px;flex:none;background:#a8dfd0;border-radius:50%;animation:bc-breathe 1.2s ease-in-out infinite}
.bc-footer{flex:none;padding:10px 26px 18px;background:#101214;border-top:1px solid #ffffff0b}
.bc-notice{font-size:13px;color:#d6dcd9;padding:8px 0;overflow-wrap:anywhere}
.bc-notice:empty,.bc-access:empty{display:none}
.bc-access{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:4px 0 12px}
.bc-access p{margin:0;font-size:12px;color:#c0c6cb;flex:1;min-width:160px}
.bc-access-button{border:0;background:#263a34;border-radius:11px;color:#bde9dc;padding:8px 14px;font-size:13px!important}
.bc-quick{margin:0 0 6px}
.bc-quick>summary{display:flex;align-items:center;justify-content:space-between;min-height:44px;color:#c0c6cb;font-size:12px;cursor:pointer;list-style:none}
.bc-quick>summary::-webkit-details-marker{display:none}
.bc-quick>summary:after{content:"";width:6px;height:6px;border-right:1.8px solid currentColor;border-bottom:1.8px solid currentColor;transform:rotate(45deg);margin-right:4px}
.bc-quick[open]>summary:after{transform:rotate(225deg)}
.bc-quick .bc-prompts{max-width:none;max-height:132px;overflow:auto;grid-template-columns:1fr 1fr;margin:0 0 10px;gap:6px;overscroll-behavior:contain}
.bc-quick .bc-prompts button{font-size:12px;padding:9px 11px;line-height:1.5}
.bc-compose{border:1px solid #ffffff16;background:#1c1f22;border-radius:18px;padding:12px 12px 9px}
.bc-compose:focus-within{border-color:#a8dfd080;box-shadow:0 0 0 3px #a8dfd00d}
.bc-compose textarea{display:block;width:100%;min-height:56px;max-height:140px;resize:none;border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;color:#f4f5f6;padding:0 3px;line-height:1.5;font-size:16px}
.bc-compose textarea::placeholder{color:#929ba1}
.bc-compose-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:6px}
.bc-compose-actions>span{font-size:11px;color:#aab3b8;line-height:1.5}
.bc-send{display:flex;align-items:center;justify-content:center;gap:6px;background:#a8dfd0;color:#10211b;border:0;border-radius:12px;padding:9px 13px;font-size:13px!important;font-weight:650!important;flex:none}
.bc-send svg{width:18px;height:18px}
.bushi-consult button:disabled{opacity:.38;cursor:default}
.bc-footnote{font-size:11px;color:#9ca5aa;margin:9px 0 0;text-align:center}
.bc-sr-only{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;padding:0;overflow:hidden;white-space:nowrap}
.bushi-consult button:focus-visible,.bc-context summary:focus-visible{outline:2px solid #a8dfd0;outline-offset:3px}
@media(max-width:640px){.bushi-consult{width:100%;height:var(--bc-viewport-height,100dvh);margin:0;border:0;border-radius:0;max-height:100dvh}.bc-header{padding:calc(17px + env(safe-area-inset-top)) 20px 15px}.bc-header h2{font-size:24px}.bc-scroll{padding:16px 20px}.bc-footer{padding:10px 16px calc(12px + env(safe-area-inset-bottom))}.bc-welcome{padding:20px 0}.bc-message{max-width:100%}.bc-prompts button{font-size:13px}.bc-header p{font-size:11px}.bc-compose{border-radius:16px}.bc-welcome h3{font-size:21px}}
.bc-keyboard .bc-mode-section,.bc-keyboard .bc-eyebrow,.bc-keyboard .bc-header p,.bc-keyboard .bc-quick{display:none}
.bc-keyboard .bc-header{padding-top:10px;padding-bottom:10px;align-items:center}
@media(max-width:640px){.bc-mode-section{padding:0 20px 12px}.bc-modes{gap:8px}.bc-modes button{padding:10px 12px}.bc-welcome{padding-top:12px}.bc-orb{width:48px;height:48px;border-radius:17px;margin-bottom:12px}.bc-welcome h3{font-size:20px}.bc-welcome p{margin-bottom:16px}}
@keyframes bc-appear{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}
@keyframes bc-breathe{50%{opacity:.35;transform:scale(.8)}}
@media(prefers-reduced-motion:reduce){.bushi-consult[open],.bc-thinking span{animation:none}.bc-context summary::after,.bc-prompts button{transition:none}}
@media(prefers-reduced-motion:reduce){.bc-modes button{transition:none}}
/* Use the same independent input and text send control as Life Book. */
.bc-footer{background:#0e1c22;padding:12px 20px 12px;border-top:1px solid #7195a026}
.bc-compose{border:0;border-radius:0;padding:0;background:transparent}
.bc-compose:focus-within{border:0;box-shadow:none}
.bushi-consult .bc-compose textarea{min-height:80px;max-height:150px;border:1px solid #7195a04d!important;border-radius:12px;background:#09151b!important;color:#eaf3ef;padding:12px 14px;font-size:16px;line-height:1.65}
.bushi-consult .bc-compose textarea:focus{border-color:#95c7be!important;box-shadow:0 0 0 2px #a3d8cd16!important;background:#0c181d!important}
.bc-compose-actions{gap:12px;padding-top:11px}
.bc-send{min-height:44px;border:1px solid #bbe5dc;border-radius:9px;background:#a3d8cd;color:#102825;font-size:12px!important;padding:10px 18px}
.bc-send svg{display:none}
.bc-header h2{display:flex;align-items:center;gap:10px}
.bc-phase{display:block;margin-top:3px;font-size:11px;color:#91aaa4}
.bc-breath{position:relative;display:inline-grid;place-items:center;width:22px;height:22px;flex:none}
.bc-breath::before,.bc-breath::after{content:"";position:absolute;border-radius:50%}
.bc-breath::before{width:20px;height:20px;background:conic-gradient(from 35deg,#5bddcf9c,#8394f2a6,#e7c5768c,#5bddcf9c);filter:blur(3px);opacity:.55}
.bc-breath::after{width:9px;height:9px;border:1px solid #c9ffef70;background:radial-gradient(circle at 28% 22%,#ddfff4 0%,#78e4dd 28%,#879cf0 65%,#dfbd7e 100%);box-shadow:0 0 8px #76dfe44d}
.bushi-consult[open] .bc-breath::before{animation:bc-halo 2.6s ease-in-out infinite}
.bushi-consult[open] .bc-breath::after{animation:bc-core 2.6s ease-in-out infinite}
.bc-working .bc-breath::before{width:25px;height:25px}
@keyframes bc-halo{0%,100%{opacity:.42;transform:scale(.78) rotate(-12deg)}50%{opacity:.85;transform:scale(1.08) rotate(16deg)}}
@keyframes bc-core{0%,100%{opacity:.76;transform:scale(.9)}50%{opacity:1;transform:scale(1.04)}}
@media(max-width:640px){.bc-footer{padding:12px 14px calc(12px + env(safe-area-inset-bottom))}.bushi-consult .bc-compose textarea{min-height:78px}.bc-keyboard .bc-phase{display:none}}
@media(prefers-reduced-motion:reduce){.bushi-consult[open] .bc-breath::before,.bushi-consult[open] .bc-breath::after{animation:none}}
/* The page-wide margin reset also resets the dialog's UA centering. Desktop
   owns its inset/margin explicitly; the existing mobile fullscreen rules stay intact. */
@media(min-width:800px){
  .bushi-consult{position:fixed;inset:0;margin:auto;box-sizing:border-box;width:min(780px,calc(100vw - 48px));height:min(900px,calc(var(--bc-viewport-height,100dvh) - 64px));max-width:calc(100vw - 48px);max-height:calc(100dvh - 64px);border-radius:24px}
  .bushi-consult-panel{height:100%;min-height:0;min-width:0;overflow:hidden}
  .bushi-consult .bc-header{align-items:center;gap:16px;padding:16px 24px 12px}
  .bushi-consult .bc-header>div{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:12px;row-gap:4px;min-width:0;flex:1}
  .bushi-consult .bc-eyebrow{display:none}
  .bushi-consult .bc-header h2{grid-column:1;grid-row:1;margin:0;font-size:24px;line-height:1.25}
  .bushi-consult .bc-header p{grid-column:1/-1;grid-row:2;font-size:14px;line-height:1.45}
  .bushi-consult .bc-phase{grid-column:2;grid-row:1;align-self:center;margin:0;font-size:12px;line-height:1.5}
  .bushi-consult .bc-mode-section{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,2fr);align-items:center;gap:16px;padding:10px 24px 12px}
  .bushi-consult .bc-mode-heading{min-width:0;min-height:44px;justify-content:flex-start;gap:8px;font-size:12px;line-height:1.5}
  .bushi-consult .bc-mode-heading>span{min-width:0}
  .bushi-consult .bc-mode-heading button{flex:none}
  .bushi-consult .bc-modes{min-width:0;gap:8px}
  .bushi-consult .bc-modes button{min-width:0;min-height:54px;padding:8px 12px;gap:2px;border-radius:12px}
  .bushi-consult .bc-modes strong{font-size:14px;line-height:1.3}
  .bushi-consult .bc-modes button>span{font-size:12px;line-height:1.4}
  .bushi-consult .bc-scroll{flex:1 1 0;min-height:0;min-width:0;overflow-x:hidden;overflow-y:auto;padding:20px 24px;scrollbar-gutter:stable;overscroll-behavior:contain}
  .bushi-consult .bc-context{margin-bottom:16px}
  .bushi-consult .bc-context p,.bushi-consult .bc-welcome p,.bushi-consult .bc-empty p{font-size:14px;line-height:1.7}
  .bushi-consult .bc-message{max-width:100%;margin:16px 0 20px}
  .bushi-consult .bc-message.is-user{max-width:85%;margin-left:auto}
  .bushi-consult .bc-message-content{font-size:14px;line-height:1.85}
  .bushi-consult .bc-footer{flex:none;padding:10px 24px 12px}
  .bushi-consult .bc-notice{padding:4px 0 8px;font-size:14px;line-height:1.5}
  .bushi-consult .bc-access{padding:0 0 8px}
  .bushi-consult .bc-access p{font-size:14px;line-height:1.5}
  .bushi-consult .bc-quick{margin-bottom:4px}
  .bushi-consult .bc-quick>summary{min-height:44px;font-size:13px}
  .bushi-consult .bc-quick .bc-prompts{max-height:104px;margin-bottom:8px}
  .bushi-consult .bc-quick .bc-prompts button{font-size:14px}
  .bushi-consult .bc-compose{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px}
  .bushi-consult .bc-compose textarea{height:76px;min-height:76px;max-height:120px;padding:10px 12px;font-size:14px;line-height:1.7}
  .bushi-consult .bc-compose-actions{flex-direction:column;align-items:flex-end;justify-content:flex-end;max-width:160px;gap:6px;padding:0}
  .bushi-consult .bc-compose-actions>span{max-width:160px;text-align:right;font-size:12px;line-height:1.5}
  .bushi-consult .bc-send{min-width:80px;min-height:44px;font-size:14px!important}
  .bushi-consult .bc-footnote{margin-top:7px;font-size:12px;line-height:1.4}
}
@media(min-width:800px) and (max-height:700px){
  .bushi-consult{height:calc(var(--bc-viewport-height,100dvh) - 32px);max-height:calc(100dvh - 32px)}
  .bushi-consult .bc-header{padding-top:12px;padding-bottom:10px}
  .bushi-consult .bc-mode-section{padding-top:6px;padding-bottom:8px}
  .bushi-consult .bc-modes button{min-height:44px}
  .bushi-consult .bc-modes button>span{display:none}
  .bushi-consult .bc-scroll{padding-top:14px;padding-bottom:14px}
  .bushi-consult .bc-quick .bc-prompts{max-height:88px}
  .bushi-consult .bc-compose textarea{height:64px;min-height:64px}
}
@media(max-width:799px) and (max-height:700px){
  .bushi-consult .bc-header{padding:calc(10px + env(safe-area-inset-top)) 16px 10px;align-items:center}
  .bushi-consult .bc-eyebrow{display:none}
  .bushi-consult .bc-header h2{font-size:22px;line-height:1.3}
  .bushi-consult .bc-header p{margin-top:4px;line-height:1.5}
  .bushi-consult .bc-mode-section{padding:0 16px 8px}
  .bushi-consult .bc-modes button{min-height:44px;padding:8px 12px}
  .bushi-consult .bc-modes button>span{display:none}
  .bushi-consult .bc-scroll{padding:12px 16px}
  .bushi-consult .bc-footer{padding:8px 14px calc(8px + env(safe-area-inset-bottom))}
  .bushi-consult .bc-compose textarea{height:64px;min-height:64px}
  .bushi-consult .bc-compose-actions{padding-top:6px}
  .bushi-consult .bc-footnote{margin-top:6px;font-size:10px;line-height:1.4}
}
