/* ChatGPT-style application navigation. The legacy bottom bar is gone. */
:root{
  --app-content-safe-top:max(env(safe-area-inset-top,0px),var(--tg-safe-area-inset-top,0px),var(--tg-content-safe-area-inset-top,0px));
  --app-content-safe-bottom:max(env(safe-area-inset-bottom,0px),var(--tg-safe-area-inset-bottom,0px),var(--tg-content-safe-area-inset-bottom,0px));
}
.bottom-nav{display:none!important}
.app-root{padding-bottom:0!important}
body.chatgpt-sidebar-open{overflow:hidden!important}
.sidebar-menu-row{height:calc(58px + var(--app-content-safe-top));box-sizing:border-box;display:flex;align-items:center;position:sticky;top:0;z-index:30;margin:0 -16px;padding:var(--app-content-safe-top) 16px 0;background:rgba(17,17,31,0.94);border-bottom:1px solid var(--app-border);backdrop-filter:blur(18px)}
.sidebar-menu-trigger{width:40px;height:40px;flex:0 0 40px;display:inline-flex;align-items:center;justify-content:center;padding:0;border:1px solid rgba(196,164,119,0.2);border-radius:12px;background:#171728;color:#f7f1e8;cursor:pointer}
.sidebar-menu-trigger .sidebar-svg{width:23px;height:23px}
.sidebar-menu-trigger:active{transform:scale(.96)}
.chat-titlebar{top:calc(58px + var(--app-content-safe-top))!important;box-sizing:border-box}
.sidebar-svg{display:block;width:21px;height:21px;flex:0 0 auto}
.chatgpt-sidebar-layer{position:fixed;top:var(--app-content-safe-top);right:0;bottom:0;left:0;z-index:1000;pointer-events:none;visibility:hidden;transition:visibility 0s linear .22s}
.chatgpt-sidebar-layer.open{pointer-events:auto;visibility:visible;transition-delay:0s}
.chatgpt-sidebar-backdrop{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;background:rgba(11,12,24,0.56);opacity:0;transition:opacity .22s ease}
.chatgpt-sidebar-layer.open .chatgpt-sidebar-backdrop{opacity:1}
.chatgpt-sidebar{position:absolute;inset:0 auto 0 0;width:min(330px,88vw);height:100%;box-sizing:border-box;display:flex;flex-direction:column;background:#11111f;border-right:1px solid rgba(196,164,119,0.17);box-shadow:20px 0 50px rgba(0,0,0,.38);transform:translateX(-102%);transition:transform .22s ease;padding-top:8px;padding-bottom:calc(var(--app-content-safe-bottom) + 8px);color:#f7f1e8}
.chatgpt-sidebar-layer.open .chatgpt-sidebar{transform:translateX(0)}
.chatgpt-sidebar-head{height:48px;flex:0 0 48px;display:flex;align-items:center;justify-content:space-between;padding:0 12px 0 16px}
.chatgpt-sidebar-head strong{font-size:14px;font-weight:750}
.chatgpt-sidebar-close{width:36px;height:36px;display:flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:10px;background:transparent;color:#e8bc73;cursor:pointer}
.chatgpt-sidebar-close .sidebar-svg{width:22px;height:22px}
.chatgpt-sidebar-close:active{background:rgba(196,164,119,0.06)}
.chatgpt-sidebar-primary{display:grid;gap:3px;padding:6px 9px 12px;border-bottom:1px solid rgba(196,164,119,0.12)}
.chatgpt-sidebar-link{width:100%;min-height:45px;box-sizing:border-box;display:flex;align-items:center;gap:12px;padding:0 12px;border:0;border-radius:11px;background:transparent;color:#f7f1e8;text-decoration:none;text-align:left;font:inherit;font-size:13px;cursor:pointer}
.chatgpt-sidebar-new-chat{margin-bottom:3px;color:#f7f1e8}
.chatgpt-sidebar-new-chat .chatgpt-sidebar-icon{color:#f7f1e8}
.chatgpt-sidebar-new-chat:disabled{opacity:.55;cursor:wait}
.chatgpt-sidebar-icon{width:22px;height:22px;display:flex;align-items:center;justify-content:center;color:#e8bc73}
.chatgpt-sidebar-icon .sidebar-svg{width:20px;height:20px}
.chatgpt-sidebar-link b{font:inherit;font-weight:650}
.chatgpt-sidebar-link.active,.chatgpt-sidebar-link:active{background:#221f30;color:#f7f1e8}
.chatgpt-sidebar-link.active .chatgpt-sidebar-icon{color:#f7f1e8}
.chatgpt-sidebar-chats{min-height:0;flex:1;display:flex;flex-direction:column;padding:11px 8px 8px}
.chatgpt-sidebar-section-head{height:32px;display:flex;align-items:center;justify-content:space-between;padding:0 8px;color:#b8adbf;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.chatgpt-sidebar-section-title{display:flex;align-items:center;gap:7px}
.chatgpt-sidebar-section-title .sidebar-svg{width:15px;height:15px}
.chatgpt-sidebar-section-head a{display:none!important}
.chatgpt-sidebar-chat-list{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;padding:2px 0 8px;scrollbar-width:thin}
.chatgpt-sidebar-chat{height:39px;display:flex;align-items:center;padding:0 10px;border-radius:9px;color:#f7f1e8;text-decoration:none;font-size:12px;white-space:nowrap;overflow:hidden}
.chatgpt-sidebar-chat span{overflow:hidden;text-overflow:ellipsis}
.chatgpt-sidebar-chat.active,.chatgpt-sidebar-chat:active{background:#221f30;color:#f7f1e8}
.chatgpt-sidebar-muted{padding:10px;color:#9e92ab;font-size:12px}
.chatgpt-sidebar-profile{min-height:62px;display:grid;grid-template-columns:40px minmax(0,1fr) 20px;align-items:center;gap:7px;margin:0 8px;padding:7px 9px;border-top:1px solid rgba(196,164,119,0.12);border-radius:11px;color:#f7f1e8;text-decoration:none}
.chatgpt-sidebar-profile.active,.chatgpt-sidebar-profile:active{background:#221f30}
.chatgpt-sidebar-profile-icon{width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#221f30;color:#f7f1e8}
.chatgpt-sidebar-profile-icon .sidebar-svg{width:20px;height:20px}
.chatgpt-sidebar-profile b,.chatgpt-sidebar-profile small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chatgpt-sidebar-profile b{font-size:13px}.chatgpt-sidebar-profile small{margin-top:2px;color:#b8adbf;font-size:10px}
.chatgpt-sidebar-chevron{display:flex;align-items:center;justify-content:center;color:#9e92ab}
.chatgpt-sidebar-chevron .sidebar-svg{width:18px;height:18px}
@media(min-width:900px){.chatgpt-sidebar{width:330px}}

/* The duplicated application brand header is obsolete across the whole Mini App.
   Keep it non-rendering even for a frame while the DOM cleanup observer removes it. */
.app-header{display:none!important}

/* Old home-page shortcuts are obsolete now that sidebar navigation owns history/templates. */
.chats-toolbar{display:none!important}

/* File creation is an explicit per-answer action. Legacy Word/CI controls stay hidden. */
.download-word,#create-file-trigger,#code-timer,.template-code{display:none!important}
.bubble.assistant{position:relative;padding-top:46px;padding-bottom:56px}
.answer-copy-top{position:absolute!important;top:9px!important;right:9px!important;bottom:auto!important;margin:0!important}
.answer-actions{right:9px;bottom:9px;display:flex;align-items:center;gap:7px}
.create-file-message{min-height:34px;display:inline-flex;align-items:center;justify-content:center;gap:5px;border:1px solid var(--app-border);border-radius:10px;background:#221f30;color:#f7f1e8;padding:0 11px;font:inherit;font-size:11px;font-weight:700;cursor:pointer;transition:background .16s,border-color .16s,transform .1s}
.create-file-message span{font-size:16px;line-height:1}
.create-file-message strong{font:inherit;font-weight:700;white-space:nowrap}
.create-file-message:hover,.create-file-message:focus-visible{border-color:rgba(196,164,119,0.58);background:#221f30;outline:0}
.create-file-message:active{transform:scale(.97)}
.create-file-message:disabled{opacity:.5;cursor:not-allowed;transform:none}
.file-session-status{display:none;width:max-content;max-width:100%;margin:7px 0 9px;padding:5px 9px;border:1px solid rgba(196,164,119,0.26);border-radius:999px;background:rgba(196,164,119,0.08);color:#e8bc73;font-size:10px;line-height:1.3;font-weight:600}
.file-session-status.active{display:block}
.file-session-status span{color:#f7f1e8;font-variant-numeric:tabular-nums;font-weight:750}
.file-create-drawer .create-file-format{width:100%;color:#f7f1e8;text-align:left;cursor:pointer}
.file-create-drawer .create-file-format:hover,.file-create-drawer .create-file-format:focus-visible{border-color:rgba(196,164,119,0.58);outline:0}

/* Generated files are compact service results, not normal assistant answers. */
.bubble.assistant.generated-file-only{padding:12px 14px 11px}
.generated-file-only .generated-file{margin-top:0}
.generated-file-only .message-time{margin-top:8px;text-align:right}
.generated-file-only .cost{margin-top:7px}

/* Shared send control: same visual language as the clinical trainer. */
.prompt-send{
  position:relative;
  display:grid!important;
  place-items:center!important;
  flex:0 0 42px!important;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  min-height:42px!important;
  padding:0!important;
  overflow:hidden;
  border:1px solid rgba(196,164,119,0.55)!important;
  border-radius:50%!important;
  background:linear-gradient(145deg,#f0cc8d,#d6a35e)!important;
  color:#2b2030!important;
  box-shadow:0 8px 20px rgba(196,164,119,0.28),inset 0 1px 0 rgba(196,164,119,0.16)!important;
  font-size:17px!important;
  font-weight:900!important;
  line-height:1!important;
  transition:transform .15s ease,filter .15s ease,box-shadow .15s ease!important;
}
.prompt-send span{
  display:block;
  transform:translateX(1px);
  line-height:1;
}
.prompt-send:hover,.prompt-send:focus-visible{
  transform:translateY(-1px);
  filter:brightness(1.07);
  box-shadow:0 10px 24px rgba(196,164,119,0.34)!important;
  outline:none;
}
.prompt-send:focus-visible{
  box-shadow:0 0 0 3px rgba(196,164,119,0.16),0 10px 24px rgba(196,164,119,0.34)!important;
}
.prompt-send:active{
  transform:translateY(0) scale(.96);
}
.prompt-send:disabled{
  opacity:.48;
  cursor:not-allowed;
  filter:saturate(.65);
  box-shadow:none!important;
}

/* Generated document cards in the unified Sol theme. */
#messages .bubble.assistant a.generated-file{
    display:flex!important;align-items:center;justify-content:space-between;gap:20px;
    width:100%;box-sizing:border-box;padding:18px 20px;margin-top:12px;
    background:#221f30!important;color:#f7f1e8!important;
    border:1px solid #756047!important;border-radius:16px;text-decoration:none!important;
    text-align:left;box-shadow:0 6px 18px rgba(0,0,0,.12);
}
#messages .bubble.assistant a.generated-file>span{display:grid;gap:7px;min-width:0;flex:1}
#messages .bubble.assistant a.generated-file b{color:#f7f1e8!important;font-size:15px;line-height:1.4}
#messages .bubble.assistant a.generated-file small{display:block;color:#d8cbbb!important;font-size:12px;line-height:1.5;overflow-wrap:anywhere;word-break:break-word}
#messages .bubble.assistant a.generated-file>strong{
    display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;
    min-height:44px;padding:0 18px;border-radius:11px;
    background:#edc581!important;color:#2b2030!important;
    font-size:14px;font-weight:750;line-height:1.3;white-space:nowrap;
}
#messages .bubble.assistant a.generated-file:hover{border-color:#edc581!important}
#messages .bubble.assistant a.generated-file:hover>strong{background:#f6d9a8!important}
#messages .bubble.assistant a.generated-file:focus-visible{outline:3px solid #edc581;outline-offset:4px}
@media(max-width:520px){
    #messages .bubble.assistant a.generated-file{flex-wrap:wrap;gap:14px;padding:16px}
    #messages .bubble.assistant a.generated-file>span{flex-basis:100%}
    #messages .bubble.assistant a.generated-file>strong{width:100%;box-sizing:border-box}
}
