/* Isolated workspace navigation; leaves the chat, billing and tool apps intact. */
.shell.hx-model-open {position:relative;gap:0;padding:0;background:#23222a;}
.shell.hx-model-open #sidebar {position:relative!important;inset:auto!important;margin:0!important;padding:0!important;border-radius:0!important;box-shadow:none!important;z-index:31;}
.shell.hx-model-open #sidebar {transition:width .55s cubic-bezier(.22,1,.36,1),min-width .55s cubic-bezier(.22,1,.36,1),max-width .55s cubic-bezier(.22,1,.36,1),flex-basis .55s cubic-bezier(.22,1,.36,1),opacity .22s;}
.shell.hx-model-open.hx-model-manual #sidebar {width:0!important;min-width:0!important;max-width:0!important;flex-basis:0!important;opacity:0;overflow:hidden;pointer-events:none;border:0;}
@media(prefers-reduced-motion:reduce){.shell.hx-model-open #sidebar {transition:none!important;}}
.shell.hx-model-open #sidebar,.shell.hx-model-open #sidebar.closed {width:64px!important;min-width:64px!important;max-width:64px!important;flex:0 0 64px!important;display:flex!important;transform:none!important;overflow:visible;}
.shell.hx-model-open #sidebar > header,.shell.hx-model-open #sidebar .hx-history-zone,.shell.hx-model-open #newProject {display:none!important;}
.shell.hx-model-open #sidebar .create-actions {display:flex;flex-direction:column;gap:10px;padding:14px 7px;}
.shell.hx-model-open #sidebar .create-actions .asset-create {height:42px;min-height:42px;width:48px;min-width:0;padding:0;display:flex;align-items:center;justify-content:center;font-size:0;box-shadow:none!important;border:0;border-radius:7px;background:transparent!important;transform:none!important;outline:0;}
.shell.hx-model-open #sidebar .create-actions .asset-create[aria-pressed="true"] {background:#50425f!important;box-shadow:inset 3px 0 #bca3e1!important;}
.shell.hx-model-open #sidebar .asset-create i {font-size:20px;width:22px;height:22px;}
.hx-model-history-trigger {display:none;}
.hx-model-open .hx-model-history-trigger {display:block;width:48px;height:42px;border:0;background:transparent;color:#d2c7df;font-size:25px;cursor:pointer;border-radius:7px;}
.hx-model-open .hx-model-history-trigger:hover {background:#494151;}
.shell.hx-model-open .hx-workspace-panel {padding:0;}
.shell.hx-model-open .hx-workspace-frames {border-radius:0;border:0;}
.hx-model-history-scrim {position:absolute;inset:0 0 0 64px;background:#100e1640;border:0;z-index:29;cursor:default;}
.hx-model-history-scrim[hidden] {display:none;}
.shell.hx-model-open > .hx-model-history {position:absolute;inset:0 auto 0 64px;width:290px;max-width:calc(100% - 64px);z-index:30;opacity:0;visibility:hidden;pointer-events:none;transform:translateX(-15px);filter:blur(3px);border:0;border-right:1px solid #55505d;border-radius:0;box-shadow:15px 0 45px #08060d40;background:#302b38f5;padding:20px 16px;}
.shell.hx-model-open.hx-model-history-open > .hx-model-history {opacity:1;visibility:visible;pointer-events:auto;transform:none;filter:none;}
.shell .hx-model-history-head {justify-content:space-between;font-size:15px;border:0;padding:0;}
.shell .hx-model-history-head .hx-model-history-close {margin-left:auto;background:transparent;border:0;}
.shell .hx-model-history .hx-model-new {box-shadow:none;background:#a88ccf;border:0;color:#201728;padding:10px;font-weight:600;}
.shell .hx-model-history .hx-model-vault {padding:9px;background:transparent;border-color:#5b5068;font-size:12px;}
.shell .hx-model-history .hx-model-history-row {border:0;background:transparent;border-radius:6px;box-shadow:none;padding:9px 6px;}
.shell .hx-model-history .hx-model-history-row.is-current {background:#51435f;box-shadow:inset 2px 0 #bba0e0;}
.shell .hx-model-thumb {width:54px;height:44px;background:#26222e;border-radius:4px;font-size:22px;}
.hx-model-thumb img {width:100%;height:100%;object-fit:contain;}
.hx-model-history {
  position:absolute; inset:0; z-index:3; display:flex; flex-direction:column; gap:11px;
  padding:19px 13px 14px; background:linear-gradient(155deg,#3b2d4ff5,#231e30fc);
  color:#f0e7ff; border-radius:10px; border:1px solid #67517c; overflow:hidden;
  -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px);
  opacity:0; transform:translateX(30px) scale(.98); filter:blur(6px); visibility:hidden;
  pointer-events:none; transition:opacity .35s,transform .45s cubic-bezier(.2,.8,.2,1),filter .4s,visibility .45s;
}
.hx-model-open .hx-model-history { opacity:1; transform:none; filter:none; visibility:visible; pointer-events:auto; }
.hx-model-open .hx-workspace-frames { border-color:#655077; background:#241e30; }
.hx-model-open #sidebar { background:#2a2237; color:#efe5fb; border-color:#68537b; }
.hx-model-open #sidebar > header { border-color:#5d486c; background:#32273f; }
.hx-model-open #sidebar > header .history-icon { color:#c5a0ed; }
.hx-model-history-head { display:flex; align-items:center; gap:10px; font-size:17px; font-weight:700; padding:0 2px 6px; }
.hx-model-history-icon { width:34px; height:34px; display:grid; place-items:center; border:1px solid #ad84d1; border-radius:10px; background:#71518b; font-size:27px; color:#eed7ff; }
.hx-model-history button { font:inherit; cursor:pointer; color:inherit; border:1px solid #6c537f; border-radius:9px; background:#443252; transition:background .2s,transform .2s; }
.hx-model-history button:disabled { opacity:.55; cursor:wait; }
.hx-model-history button:hover:not(:disabled) { background:#604577; }
.hx-model-history button:active:not(:disabled) { transform:scale(.98); }
.hx-model-history button:focus-visible, .hx-model-search:focus-visible { outline:2px solid #c6a2f6; outline-offset:2px; }
.hx-model-history .hx-model-new { padding:13px 6px; background:linear-gradient(120deg,#a47ad1,#76539d); border-color:#ba96e0; font-size:13px; box-shadow:0 3px 0 #493056; }
.hx-model-search { box-sizing:border-box; width:100%; min-width:0; border:1px solid #574464; border-radius:8px; padding:10px 11px; font:inherit; font-size:12px; color:#f2e9ff; background:#241d31; }
.hx-model-search::placeholder { color:#b9a5ca; }
.hx-model-history-rows { flex:1; min-height:0; overflow:auto; display:flex; flex-direction:column; gap:8px; padding:2px; }
.hx-model-history .hx-model-history-row { display:flex; align-items:center; gap:10px; padding:12px 9px; width:100%; text-align:left; background:#34283f; border-color:#554260; flex:none; }
.hx-model-history .hx-model-history-row.is-current { background:linear-gradient(120deg,#62437d,#4c345f); border-color:#b085d4; box-shadow:inset 3px 0 #d1abff; }
.hx-model-thumb { width:32px; height:36px; display:grid; place-items:center; flex:none; background:#211a2d70; color:#cca9ed; font-size:29px; border-radius:7px; }
.hx-model-history-copy { min-width:0; display:grid; gap:5px; }
.hx-model-history-copy b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:600; }
.hx-model-history-copy small { color:#bda7d0; font-size:10px; }
.hx-model-history-info { font-size:10px; color:#c1abcF; line-height:1.6; margin:0; }
.hx-model-history .hx-model-more, .hx-model-history .hx-model-refresh, .hx-model-history .hx-model-home { padding:8px; font-size:11px; }
.hx-model-history .hx-model-refresh { background:transparent; border:0; color:#d3bce6; }
.hx-model-history [hidden] { display:none !important; }
@media(prefers-reduced-motion:reduce) { .hx-model-history { transition:none; } }
.hx-history-zone { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; isolation: isolate; }
.hx-history-zone > .project-list { flex: 0 1 auto; min-height: 0; }
.hx-history-return[hidden], .hx-workspace-panel[hidden], .hx-tool-pane[hidden],
.hx-tool-message[hidden], .hx-workspace-toolbar[hidden], .shell.hx-tool-open > .main { display: none !important; }
.hx-history-return {
  position: absolute; inset: 0; z-index: 2; width: 100%; border: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 24px 16px; color: var(--text); cursor: pointer;
  background: color-mix(in srgb, var(--side) 65%, transparent);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  border-radius: 8px; text-align: center;
}
.hx-history-return b { font-size: 16px; line-height: 1.7; }
.hx-history-return small { color: var(--muted); font-size: 12px; line-height: 1.7; white-space: pre-line; }
.hx-history-return .hx-return-mark {
  width: 46px; height: 46px; display: grid; place-items: center; font-size: 26px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--green);
}
.hx-history-return:hover { background: color-mix(in srgb, var(--side) 78%, transparent); }
.hx-history-return:focus-visible, .hx-workspace-toolbar button:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
.shell .create-actions a.new-project.asset-create[aria-pressed="true"] {
  --hue-top: color-mix(in srgb, var(--hue) 76%, var(--text));
  transform: translateY(3px); filter: brightness(.93);
  box-shadow: inset 0 3px 5px #0006, inset 0 -1px 0 #ffffff30 !important;
  outline: 2px solid color-mix(in srgb, var(--hue) 65%, var(--text)); outline-offset: 1px;
}
.hx-workspace-panel { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 12px 12px 15px; }
.hx-workspace-toolbar { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 10px 4px 14px; }
.hx-workspace-toolbar button { color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; cursor: pointer; font: inherit; }
.hx-workspace-toolbar button:hover { border-color: var(--green); color: var(--green); }
.hx-workspace-title { font-size: 17px; }
.hx-workspace-hint { margin-left: auto; color: var(--muted); font-size: 12px; }
.hx-workspace-frames { position: relative; flex: 1; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.hx-tool-pane { width: 100%; height: 100%; position: relative; }
.hx-tool-pane iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--page, var(--panel)); }
.hx-tool-message { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; background: var(--panel); text-align: center; color: var(--muted); }
.hx-tool-message button, .hx-tool-message a { padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); color: var(--text); cursor: pointer; font: inherit; }
@media (max-width: 820px), (max-height: 520px) and (pointer: coarse) {
  .hx-workspace-panel { padding: 0; }
  .hx-workspace-toolbar { gap: 8px; padding: 8px; padding-top: max(8px, env(safe-area-inset-top)); }
  .hx-workspace-toolbar button { font-size: 13px; padding: 10px; }
  .hx-workspace-title { font-size: 14px; }
  .hx-workspace-hint { display: none; }
  .hx-workspace-frames { border-radius: 0; border-left: 0; border-right: 0; }
}
