.fgfD9rc1 {
  display: inline-flex;
  align-items: baseline;
  white-space: pre;
  font-variant-numeric: tabular-nums;
}

._rYE6_cE {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.35em);
  animation: vcndVgTC 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.yLasWmDV {
  --digit-delay: 0s;
  --digit-duration: 0.8s;
  --from-digit: 0;
  --to-digit: 0;

  display: inline-block;
  height: 1em;
  overflow: hidden;
  line-height: 1;
  vertical-align: baseline;
}

.wooyx2kp {
  display: flex;
  flex-direction: column;
  transform: translateY(calc(var(--to-digit) * -1em));
  animation: a3Y__uxB var(--digit-duration) cubic-bezier(0.2, 0.8, 0.2, 1)
    both;
  animation-delay: var(--digit-delay);
}

.fJNfNZmQ {
  display: block;
  height: 1em;
  line-height: 1;
}

@keyframes a3Y__uxB {
  from {
    transform: translateY(calc(var(--from-digit) * -1em));
  }
  to {
    transform: translateY(calc(var(--to-digit) * -1em));
  }
}

@keyframes vcndVgTC {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  ._rYE6_cE {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .wooyx2kp {
    animation: none;
  }
}

.K0SvA1K_ {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  border-radius: 20px;
  overflow: hidden;
  padding: 10px;
  background: var(--bg-card);

  .FUjzcKZe {
    flex-shrink: 0;

    .DFHlNnSD {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: color-mix(in srgb, var(--ink-muted) 84%, transparent);
      transition: transform 0.3s;
      cursor: pointer;
    }

    .nkbJZlKs,
    .DFHlNnSD:hover {
      transform: scale(1.5);
    }

    .JvwYXLuK {
      background: var(--accent-danger);
    }

    .baPF8ioM {
      background: var(--accent-lime);
    }
  }

  .XqVI4rDs {
    flex-shrink: 0;
  }

  .Fykwy35r {
    color: var(--text-muted);
  }

  button {
    font-size: 12px;

  }
}

.yvFmJBRr {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.yTfGMfZd {
  font-size: 12px;

  .Crqa7djb {
    padding: 0 10px 10px;
    gap: 16px;
  }

  .qwE06XRB {
    color: var(--text-main);
    font-weight: bold;
    font-size: 14px;
  }

  .UQNWJJX2 {
    padding: 0 12px 12px;
    color: var(--text-muted);
  }

  .JAG76VNK {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
  }

  .kbHMYVhI {
    color: var(--text-main);
    font-weight: bold;
    line-height: 1.5;
    word-break: break-all;
  }

  .mcBqVP14 {
    resize: none;
  }

  .t6IopxKW {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .w_QkiEj6 {
    padding: 6px 3px;
    border-radius: 16px;
    color: var(--text-muted);
    font-size: 12px;
    flex: 1;

     {
      input {
        font-size: 12px;
      }
    }

    &:hover,
    &:focus-within:not(&.oVyzMPVh) {
      background-color: var(--bg-hover);
    }

    &:focus-within&.oVyzMPVh {
      border-color: var(--accent);
    }

    &.ant-radio-wrapper-checked {
      .sJclULMe {
        background: var(--text-main);
        color: var(--bg-base);
        border-color: var(--text-main);

        .material-symbols-rounded {
          color: var(--bg-base);
        }
      }
    }

    .sJclULMe {
      border-radius: 50%;
      background: var(--bg-hover);
      border: 1px solid var(--line);
      width: 20px;
      height: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;

      .material-symbols-rounded {
        font-size: 12px;
        color: var(--text-muted);
      }
    }

    .JBaQNWDn {
      color: var(--text-main);
      font-weight: bold;
      white-space: nowrap;
    }
  }

  .oVyzMPVh {
    border: 1px solid transparent;
    color: var(--text-main);
  }

  .t6IopxKW .Selected {
    color: var(--colorTextSecondary);
    background-color: var(--bg-hover);
    padding: 0 6px;
    border-radius: 10px;
    font-size: 12px;
    display: none;
  }

  .t6IopxKW .ant-radio {
    display: none;
  }

  .t6IopxKW .ant-radio-wrapper-checked .Selected {
    display: block;
  }

  .t6IopxKW .ant-radio-wrapper>:last-child {
    flex: 1;
  }
}
.yK1jrSh3 {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  border-radius: 20px;
  overflow: hidden;
  padding: 10px;
  background: var(--bg-card);

  .Pn82pu37 {
    color: var(--text-muted);
  }

  .eONcrOwM {
    margin-bottom: 0;
  }

  button {
    font-size: 12px;

  }
}

.YqYNSyg3 {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
  margin-left: 14px;
}

.kaY9_AuX {
  font-size: 12px;

  .kR73WOqW {
    padding: 0 10px 10px;
    gap: 16px;
  }

  .yn_ipgqn {
    flex-shrink: 0;

    .RaPg_zt8 {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: color-mix(in srgb, var(--ink-muted) 84%, transparent);
      transition: transform 0.3s;
      cursor: pointer;
    }

    .xLHH_lX3,
    .RaPg_zt8:hover {
      transform: scale(1.5);
    }

    .M3S2bs1a {
      background: var(--accent-danger);
    }

    .YVXR6dRX {
      background: var(--accent-lime);
    }

  }

  ._hnbGqGe {
    color: var(--text-main);
    font-weight: bold;
    font-size: 14px;
  }

  .FPwmD7aN {
    color: var(--text-muted);
    line-height: 1.5;
  }

  .w_UYikbM {
    margin: 0 10px 10px;
    width: auto;
  }

  .S_XZE7wi {
    display: flex;
    flex-direction: column;
    gap: 4px;

     {
      .lmhIELWW {
        color: var(--colorTextSecondary);
        background-color: var(--colorBgTextHover, rgba(0, 0, 0, 0.06));
        padding: 1px 8px;
        border-radius: 10px;
        font-size: 12px;
        display: none;
      }

      .JhyiyCep {
        display: none;
      }

      .B_xjypE_>:last-child {
        flex: 1;
      }

      .VWzsiylZ {
        .lmhIELWW {
          display: block;
        }
      }
    }
  }

  .mc84oqUz {
    padding: 6px 3px;
    border-radius: 16px;
    color: var(--text-muted);
    font-size: 12px;

     {
      input {
        font-size: 12px;
      }
    }

    &:hover:not(&.m8pOyStt),
    &:focus-within:not(&.m8pOyStt) {
      background-color: var(--bg-hover);
    }

    &:focus-within&.m8pOyStt {
      border-color: var(--accent);
    }

    &.ant-checkbox-wrapper-checked {
      .ykov3Ryz {
        background: var(--text-main);
        color: var(--bg-base);
        border-color: var(--text-main);
      }
    }

    .ykov3Ryz {
      border-radius: 50%;
      background: var(--bg-hover);
      border: 1px solid var(--line);
      width: 20px;
      height: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;

      .material-symbols-rounded {
        font-size: 12px;
      }
    }

    .PDaVCTuW {
      color: var(--text-main);
      font-weight: bold;
    }
  }

  .m8pOyStt {
    border: 1px solid transparent;
    padding: 6px 10px;
    margin: 4px 0;
  }

  .S_XZE7wi .Selected {
    color: var(--colorTextSecondary);
    background-color: var(--bg-hover);
    padding: 0 6px;
    border-radius: 10px;
    font-size: 12px;
    display: none;
  }

  .S_XZE7wi .ant-checkbox {
    display: none;
  }

  .S_XZE7wi .ant-checkbox-wrapper-checked .Selected {
    display: block;
  }

  .S_XZE7wi .ant-checkbox-wrapper>:last-child {
    flex: 1;
  }
}

.NAc6KSx0 {
  width: min(340px, 80vw);
  height: 200px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}

.GlErqnyj {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.L6TF5Tg2 {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  border-radius: 20px;
  overflow: hidden;
  padding: 10px;
  background: var(--bg-card);

  .sWP7y8ea {
    color: var(--text-muted);
  }
  button {
    font-size: 12px;
  }
}

.s2rF8bQf {
  font-size: 12px;
  .Mam9zuCo {
    padding: 6px 10px;
    gap: 16px;

    :first-child {
      flex: 1;
    }
  }

  .mMP1obvi {
    min-width: 0;
  }

  .riwBWgAy {
    color: var(--text-main);
    font-weight: bold;
  }

  .dSOMQ6vj {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .TIACz5t7 {
    padding: 6px 3px;
    border-radius: 16px;
    color: var(--text-main);
    font-size: 12px;
    flex: 1;

    {
      input{
        font-size: 12px;
      }
    }

    &:hover:not(&.L4tVU46t),
    &:focus-within:not(&.L4tVU46t) {
      background-color: var(--bg-hover);
    }

    &:focus-within&.L4tVU46t {
      border-color: var(--accent);
    }

    &:focus-within {
      .mLC6t9mH {
        background: var(--text-main);
        color: var(--bg-base);
        border-color: var(--text-main);
      }
    }

    .mLC6t9mH {
      border-radius: 50%;
      background: var(--bg-hover);
      border: 1px solid var(--line);
      color: var(--text-muted);
      width: 20px;
      height: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;

      .material-symbols-rounded {
        font-size: 12px;
      }
    }

    .nm6H2phl {
      color: var(--text-main);
    }
  }

  .dSOMQ6vj .Selected {
    color: var(--colorTextSecondary);
    background-color: var(--bg-hover);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 12px;
    display: none;
  }

  .dSOMQ6vj .ant-checkbox {
    display: none;
  }

  .dSOMQ6vj .ant-checkbox-wrapper-checked .Selected {
    display: block;
  }

  .dSOMQ6vj .ant-checkbox-wrapper>:last-child {
    flex: 1;
  }
}

.RqnULg1z {
  background-color: var(--bg-elev-1);

  >.ant-collapse-item:last-child>.ant-collapse-header {
    padding: 4px;
    padding-left: 12px;
    align-items: center;
  }

  .ant-collapse-content>.ant-collapse-content-box {
    max-height: 400px;
    overflow: auto;
  }
}
.EMNm_K8I {
  display: inline-block;
  color: var(--colorTextTertiary, rgba(0, 0, 0, 0.45));
  background-image: linear-gradient(
    90deg,
    var(--colorTextTertiary, rgba(0, 0, 0, 0.45)) 25%,
    var(--colorText, rgba(0, 0, 0, 0.88)) 50%,
    var(--colorTextTertiary, rgba(0, 0, 0, 0.45)) 75%
  );
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: nWXUVMXv 2s linear infinite;
}

@keyframes nWXUVMXv {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .EMNm_K8I {
    background-image: none;
    -webkit-text-fill-color: currentColor;
    animation: none;
  }
}

.Z67aKVkK {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-image: linear-gradient(180deg, transparent, var(--bg-base));
  padding: 16px;

  button {
    border-radius: 20px;
  }
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/fonts/-F63fjptAgt5VM-kVkqdyU8n1iIq131nj-otFQ.290c82ef.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/fonts/-F63fjptAgt5VM-kVkqdyU8n1isq131nj-otFQ.fb3e9ad3.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/fonts/-F63fjptAgt5VM-kVkqdyU8n1iAq131nj-otFQ.c56b4559.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/fonts/-F63fjptAgt5VM-kVkqdyU8n1iEq131nj-otFQ.8f32688b.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/fonts/-F63fjptAgt5VM-kVkqdyU8n1i8q131nj-o.06fca3e5.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/fonts/-F6qfjptAgt5VM-kVkqdyU8n3twJwl1FgsAXHNlYzg.df8d3f7d.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/fonts/-F6qfjptAgt5VM-kVkqdyU8n3twJwlRFgsAXHNlYzg.75bf76c6.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/fonts/-F6qfjptAgt5VM-kVkqdyU8n3twJwl9FgsAXHNlYzg.30112ebd.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/fonts/-F6qfjptAgt5VM-kVkqdyU8n3twJwl5FgsAXHNlYzg.29020a16.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/fonts/-F6qfjptAgt5VM-kVkqdyU8n3twJwlBFgsAXHNk.022cb9ca.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/fonts/-F6qfjptAgt5VM-kVkqdyU8n3vAOwl1FgsAXHNlYzg.69fab657.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/fonts/-F6qfjptAgt5VM-kVkqdyU8n3vAOwlRFgsAXHNlYzg.db5cf17c.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/fonts/-F6qfjptAgt5VM-kVkqdyU8n3vAOwl9FgsAXHNlYzg.cdeb9ffa.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/fonts/-F6qfjptAgt5VM-kVkqdyU8n3vAOwl5FgsAXHNlYzg.d987923d.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/fonts/-F6qfjptAgt5VM-kVkqdyU8n3vAOwlBFgsAXHNk.34c0c730.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggqxSvfedN62Zw.df022f54.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggOxSvfedN62Zw.bc1540ab.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggSxSvfedN62Zw.4a172147.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggixSvfedN62Zw.071c35be.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggmxSvfedN62Zw.6283423c.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggexSvfedN4.301f680b.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggqxSvfedN62Zw.df022f54.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggOxSvfedN62Zw.bc1540ab.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggSxSvfedN62Zw.4a172147.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggixSvfedN62Zw.071c35be.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggmxSvfedN62Zw.6283423c.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggexSvfedN4.301f680b.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggqxSvfedN62Zw.df022f54.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggOxSvfedN62Zw.bc1540ab.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggSxSvfedN62Zw.4a172147.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggixSvfedN62Zw.071c35be.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggmxSvfedN62Zw.6283423c.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggexSvfedN4.301f680b.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggqxSvfedN62Zw.df022f54.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggOxSvfedN62Zw.bc1540ab.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggSxSvfedN62Zw.4a172147.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggixSvfedN62Zw.071c35be.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggmxSvfedN62Zw.6283423c.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggexSvfedN4.301f680b.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggqxSvfedN62Zw.df022f54.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggOxSvfedN62Zw.bc1540ab.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggSxSvfedN62Zw.4a172147.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggixSvfedN62Zw.071c35be.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggmxSvfedN62Zw.6283423c.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: block;
  src: url(/fonts/xn7gYHE41ni1AdIRggexSvfedN4.301f680b.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* fallback */
@font-face {
  font-family: 'Material Symbols Rounded';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/fonts/syl7-zNym6YjUruM-QrEh7-nyTnjDwKNJ_190FjpZIvLgyidOK7BDB_Qb9vUdV6_gjDK-P3JuF_Zs-obHph2-jOcZTKPq8a9A5M.c85be314.woff2) format('woff2');
}
/* greek */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/fonts/8vIH7w4qzmVxm2NL9G78HEZnMg.c8b0d73b.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* latin-ext */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/fonts/8vIH7w4qzmVxm25L9G78HEZnMg.cc8da5fa.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/fonts/8vIH7w4qzmVxm2BL9G78HEY.ac4169ab.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* greek */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/fonts/8vIH7w4qzmVxm2NL9G78HEZnMg.c8b0d73b.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* latin-ext */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/fonts/8vIH7w4qzmVxm25L9G78HEZnMg.cc8da5fa.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url(/fonts/8vIH7w4qzmVxm2BL9G78HEY.ac4169ab.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* greek */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url(/fonts/8vIH7w4qzmVxm2NL9G78HEZnMg.c8b0d73b.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* latin-ext */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url(/fonts/8vIH7w4qzmVxm25L9G78HEZnMg.cc8da5fa.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url(/fonts/8vIH7w4qzmVxm2BL9G78HEY.ac4169ab.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* greek */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 800;
  font-display: block;
  src: url(/fonts/8vIH7w4qzmVxm2NL9G78HEZnMg.c8b0d73b.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* latin-ext */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 800;
  font-display: block;
  src: url(/fonts/8vIH7w4qzmVxm25L9G78HEZnMg.cc8da5fa.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 800;
  font-display: block;
  src: url(/fonts/8vIH7w4qzmVxm2BL9G78HEY.ac4169ab.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* ========================================
   CSS Custom Properties — Theme System
   ======================================== */
:root {
    --bg-base: #ffffff;
    --bg-elev-1: #f8f8f8;
    --bg-elev-2: #fafafa;
    --bg-input: #f7f8fa;
    --bg-hover: rgba(0, 0, 0, 0.04);
    --ink-1: #1d2129;
    --ink-2: #4e5969;
    --ink-muted: #86909c;
    --line-soft: #e5e6eb;
    --line-strong: #c9cdd4;
    --accent-electric: #2663eb;
    --accent-electric-strong: #1d4ed8;
    --accent-lime: #00b42a;
    --accent-warn: #ff7d00;
    --accent-danger: #f53f3f;
    --accent-soft: #e8f0ff;
    --glass: rgba(255, 255, 255, 0.9);
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 16px 40px rgba(0, 0, 0, 0.16);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --tool-pill-scale: 0.86;
    --colorFill: rgba(0, 0, 0, 0.15);
    --colorFillSecondary: rgba(0, 0, 0, 0.06);
    --left-sidebar-close-width: 57px;
    --left-sidebar-width: 300px;
    --right-sidebar-width: 450px;
    --terminal-dock-height: 250px;
    --top-nav-height: 42px;

    --bg-page: var(--bg-base);
    --bg-card: color-mix(in srgb, var(--bg-elev-2) 100%, transparent);
    --text-main: var(--ink-1);
    --text-sub: var(--ink-2);
    --text-muted: var(--ink-muted);
    --border: var(--line-soft);
    --line: var(--line-strong);
    --accent: var(--accent-electric);
    --accent-strong: var(--accent-electric-strong);
    --danger: var(--accent-danger);
    --ok: var(--accent-lime);
    --warn: var(--accent-warn);
}

html[data-theme="dark"] {
    --bg-base: #181818;
    --bg-elev-1: #242424;
    --bg-elev-2: #202020;
    --bg-input: #111214;
    --bg-hover: rgba(255, 255, 255, 0.1);
    --ink-1: #f2f3f5;
    --ink-2: #c9cdd4;
    --ink-muted: #86909c;
    --line-soft: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --accent-electric: #4f88ff;
    --accent-electric-strong: #75a5ff;
    --accent-lime: #27c346;
    --accent-warn: #ff9a2e;
    --accent-danger: #f76560;
    --accent-soft: rgba(79, 136, 255, 0.16);
    --glass: rgba(22, 23, 25, 0.88);
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.24);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.32);
    --shadow-strong: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* ========================================
   Base Resets
   ======================================== */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg-base);
}

body {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "PingFang SC",
        "Microsoft YaHei",
        "Segoe UI",
        Roboto,
        sans-serif;
    color: var(--ink-1);
    overflow-x: hidden;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

.material-symbols-rounded {
    font-family: "Material Symbols Rounded";
    font-weight: normal;
    font-style: normal;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    font-variation-settings:
        "FILL" 0,
        "wght" 500,
        "GRAD" 0,
        "opsz" 24;
}

button {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    background: var(--bg-elev-2);
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

button:hover {
    border-color: color-mix(in srgb,
            var(--accent-electric) 60%,
            var(--line-strong));
}

button:active {
    transform: translateY(1px) scale(0.995);
}

.ui-btn {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    background: var(--bg-elev-2);
    color: var(--ink-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.12s ease;
    box-shadow: none;
}

.ui-btn.ui-btn-sm {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
}

.ui-btn.ui-btn-md {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
}

.ui-btn.is-icon-only {
    width: 32px;
    min-width: 32px;
    padding: 0;
}

.ui-btn-label {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.ui-btn-spinner {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: ui-spin 0.8s linear infinite;
}

.ui-btn.ui-btn-primary {
    border-color: color-mix(in srgb,
            var(--accent-electric) 64%,
            var(--line-soft));
    background: var(--accent-electric);
    color: #fff;
}

.ui-btn.ui-btn-danger {
    border-color: color-mix(in srgb,
            var(--accent-danger) 44%,
            var(--line-soft));
    /* background: var(--accent-danger); */
    color: var(--accent-danger);
}

.ui-btn.ui-btn-ghost {
    border: 0;
    background: transparent;
    color: var(--ink-2);
    box-shadow: none;
}

.ui-btn.ui-btn-secondary {
    background: color-mix(in srgb, var(--bg-elev-2) 92%, var(--bg-input));
}

.ui-btn.is-active {
    border-color: color-mix(in srgb,
            var(--accent-electric) 46%,
            var(--line-soft));
    background: color-mix(in srgb, var(--accent-soft) 84%, var(--bg-elev-2));
    color: var(--accent-electric-strong);
}

.ui-btn:hover {
    border-color: color-mix(in srgb,
            var(--accent-electric) 22%,
            var(--line-strong));
}

.ui-btn.ui-btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--ink-1);
    box-shadow: none;
}

.ui-btn.ui-btn-primary:hover {
    background: color-mix(in srgb, var(--accent-electric) 88%, #0b4aa2);
    border-color: color-mix(in srgb, var(--accent-electric) 60%, #0b4aa2);
    color: #fff;
}

.ui-btn.ui-btn-danger:hover {
    /* background: color-mix(in srgb, var(--accent-danger) 30%, #7a1f34); */
    border-color: color-mix(in srgb, var(--accent-danger) 56%, #7a1f34);
    /* color: #fff; */
}

.ui-btn:focus-visible,
.ui-input:focus-visible {
    outline: 1px solid var(--border);
}

.ui-btn:disabled {
    opacity: 0.58;
    cursor: not-allowed;
    box-shadow: none;
}

.ui-btn.is-loading {
    pointer-events: none;
}

.ui-input {
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--line-soft) 96%, transparent);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--bg-input) 94%, var(--bg-elev-2));
    color: var(--ink-1);
    outline: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.ui-input.ui-input-sm {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
}

.ui-input.ui-input-md {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 12px;
}

.ui-input:focus {
    border-color: color-mix(in srgb,
            var(--accent-electric) 60%,
            var(--line-soft));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-soft) 64%, transparent);
    background: var(--bg-elev-2);
}

.ui-card {
    border: 1px solid color-mix(in srgb, var(--line-soft) 96%, transparent);
    border-radius: var(--radius-md);
    background: var(--bg-elev-2);
    box-shadow: var(--shadow-soft);
}

.ui-card.ui-card-subtle {
    background: color-mix(in srgb, var(--bg-elev-2) 92%, var(--bg-input));
}

.ui-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 88%, transparent);
    padding: 2px 8px;
    font:
        600 11px/1.35 "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "PingFang SC",
        sans-serif;
    color: var(--ink-2);
    background: color-mix(in srgb, var(--bg-elev-2) 94%, var(--bg-input));
}

.ui-tag.ui-tag-accent {
    color: var(--accent-electric-strong);
    border-color: color-mix(in srgb,
            var(--accent-electric) 32%,
            var(--line-soft));
    background: color-mix(in srgb, var(--accent-soft) 34%, var(--bg-elev-2));
}

.ui-tag.ui-tag-muted {
    color: var(--ink-muted);
}

.ui-tag.ui-tag-danger {
    color: var(--accent-danger);
    border-color: color-mix(in srgb,
            var(--accent-danger) 30%,
            var(--line-soft));
    background: color-mix(in srgb, var(--accent-danger) 10%, var(--bg-elev-2));
}

.ui-section {
    border: 1px solid color-mix(in srgb, var(--line-soft) 74%, transparent);
    border-radius: 8px;
    overflow: hidden;
    background: color-mix(in srgb, var(--bg-elev-2) 92%, var(--bg-input));
}

.ui-section+.ui-section {
    margin-top: 6px;
}

.ui-section-head {
    padding: 7px 10px;
    border-bottom: 1px solid color-mix(in srgb, var(--line-soft) 74%, transparent);
    background: color-mix(in srgb, var(--bg-input) 84%, var(--bg-elev-2));
}

.ui-section-body {
    margin: 0;
    padding: 9px 11px;
    font-size: 11px;
    line-height: 1.44;
    color: var(--ink-2);
    white-space: pre-wrap;
    word-break: break-word;
}

input,
select,
textarea {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    font-size: 12px;
}

textarea {
    width: 100%;
    resize: none;
}

.hidden {
    display: none !important;
}

.ant-tooltip {
    backdrop-filter: blur(10px);
}

.ant-tooltip .ant-tooltip-arrow {
    display: none;
}

.ant-tooltip .ant-tooltip-inner {
    background: transparent;
    border: 1px solid var(--line-strong);
    color: var(--text-main);
    box-shadow: none;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fade-slide-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes node-rise {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes status-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.55;
    }
}

@keyframes ui-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes command-status-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes command-status-pulse {

    0%,
    100% {
        opacity: 0.24;
        transform: scale(0.88);
    }

    50% {
        opacity: 0.68;
        transform: scale(1.08);
    }
}

@keyframes command-status-core {

    0%,
    100% {
        transform: scale(0.9);
    }

    50% {
        transform: scale(1.08);
    }
}

@keyframes command-status-error {

    0%,
    100% {
        transform: translateX(0);
    }

    35% {
        transform: translateX(-4px);
    }

    70% {
        transform: translateX(4px);
    }
}

.ant-badge .ant-badge-count {
    box-shadow: none;
}

.ant-dropdown .ant-dropdown-menu .ant-dropdown-menu-item {
    padding: 4px 8px;
}

.ant-dropdown .ant-dropdown-menu .ant-dropdown-menu-item-icon {
    font-size: 14px;
}

.ant-dropdown .ant-dropdown-menu {

    box-shadow: var(--shadow-soft);
    border: 1px solid var(--line-soft);
}
/* 滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--line-soft);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--line);
}

::-webkit-scrollbar-button {
    display: none;
}
/* ========================================
   App Shell Layout
   ======================================== */
.app-shell {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-base);
}

.app-shell.terminal-dock-open {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.app-shell.timeline-empty-layout {
    grid-template-rows: auto minmax(0, 2fr) minmax(0, 3fr) auto;
}

.app-shell.timeline-empty-layout.terminal-dock-open {
    grid-template-rows: auto minmax(0, 2fr) minmax(0, 3fr) var(--terminal-dock-height);
}

.agent-route-loading-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--bg-base);
    color: var(--ink-1);
}

.agent-route-loading-card {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: min(320px, 100%);
    padding: 18px 20px;
}

.agent-route-loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid color-mix(in srgb, var(--accent) 22%, transparent);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: agent-route-loading-spin 0.8s linear infinite;
}

.agent-route-loading-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.agent-route-loading-copy strong {
    font-size: 14px;
    font-weight: 700;
}

.agent-route-loading-copy span {
    overflow: hidden;
    color: var(--ink-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@keyframes agent-route-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Top Navigation
   ======================================== */
.top-nav {
    grid-row: 1;
    padding-right: 6px;
}

.top-nav-inner {
    min-height: var(--top-nav-height);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.nav-group {
    display: flex;
    align-items: center;
}

.nav-left {
    justify-content: space-between;
    padding-left: 12px;
    gap: 12px;
    min-width: 150px;
}

.nav-center {
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
}

.brand-logo svg {
    display: block;
    width: 100%;
    height: 100%;
}

.brand-cluster {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.06;
}

.brand-text strong {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.brand-text span {
    font-size: 11px;
    color: var(--ink-muted);
    letter-spacing: 0.01em;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 10px;
    padding: 7px 12px;
    background: color-mix(in srgb, var(--bg-elev-2) 96%, transparent);
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
}

.icon-btn:hover {
    color: var(--accent-electric-strong);
    background: color-mix(in srgb, var(--accent-soft) 72%, var(--bg-elev-2));
}

.top-nav .icon-btn.ui-btn.is-icon-only,
.top-nav .current-worker-tool.ui-btn {
    width: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 8px;
}

.top-nav .icon-btn .material-symbols-rounded,
.top-nav .current-worker-tool .material-symbols-rounded {
    font-size: 18px;
}

.current-worker-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.current-worker-card.has-one-tool {
    padding-right: 54px;
}

.current-worker-label {
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    text-transform: uppercase;
}

.current-worker-name {
    flex: 0 1 auto;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ink-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.current-worker-role {
    flex: 0 1 auto;
    min-width: 0;
    font-size: 12px;
    line-height: 1.3;
    color: var(--ink-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.current-worker-tool.ui-btn.is-active {
    border-color: color-mix(in srgb,
            var(--accent-electric) 36%,
            var(--line-soft));
    background: color-mix(in srgb, var(--accent-soft) 84%, var(--bg-elev-2));
    color: var(--accent-electric-strong);
}

.current-worker-tool-voice.ui-btn.is-call {
    color: #2f7c49;
}

.current-worker-tool-voice.ui-btn.is-hangup {
    border-color: color-mix(in srgb, #f06b67 44%, var(--line-soft));
    background: color-mix(in srgb, #fff0ef 86%, var(--bg-elev-2));
    color: #d53f3f;
}

.current-worker-tool-voice.ui-btn.is-hangup:hover:not(:disabled) {
    border-color: color-mix(in srgb, #e4564f 52%, var(--line-soft));
    box-shadow: 0 8px 18px rgba(229, 86, 79, 0.18);
}

.current-worker-tool.ui-btn.is-muted.is-active {
    border-color: color-mix(in srgb, #ff945f 38%, var(--line-soft));
    background: color-mix(in srgb, #fff0e6 84%, var(--bg-elev-2));
    color: #cf5f18;
}

.usage-popover-anchor {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.usage-trigger.ui-btn {
    min-height: 30px;
    padding: 0 8px;
    border-radius: 8px;
    color: var(--ink-2);
}

.usage-trigger.ui-btn.is-active,
.usage-trigger.ui-btn:hover:not(:disabled) {
    color: var(--accent-electric-strong);
    background: color-mix(in srgb, var(--accent-soft) 78%, var(--bg-elev-2));
}

.usage-trigger .ui-btn-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.usage-trigger-ring {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at center,
            var(--bg-elev-2) 0 46%,
            transparent 50%),
        conic-gradient(var(--accent-electric) var(--usage-context-percent, 0%),
            var(--line-soft) 0);
}

.usage-trigger-ring span {
    color: var(--ink-1);
    font:
        700 11px/1 "IBM Plex Mono",
        monospace;
    letter-spacing: 0;
}

.usage-popover {
    position: absolute;
    z-index: 50;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, calc(100vw - 24px));
    max-height: min(70vh, 620px);
    overflow: auto;
    padding: 8px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 82%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bg-elev-2) 98%, white);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
    color: var(--ink-1);
}

.usage-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.usage-popover-header strong {
    font-size: 11px;
    line-height: 1.15;
}

.usage-popover-header span {
    max-width: 340px;
    overflow: hidden;
    color: var(--ink-muted);
    font:
        500 9px/1.15 "IBM Plex Mono",
        monospace;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.usage-popover-close.ui-btn.is-icon-only {
    width: 20px;
    min-width: 20px;
    min-height: 20px;
    padding: 0;
    border-radius: 7px;
}

.usage-popover-close-glyph::before {
    content: "close";
    font-family: "Material Symbols Rounded";
    font-size: 15px;
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
}

.usage-context-window {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent-soft) 58%, transparent);
}

.usage-context-ring {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at center,
            var(--bg-elev-2) 0 54%,
            transparent 55%),
        conic-gradient(var(--accent-electric) var(--usage-context-percent, 0%),
            color-mix(in srgb, var(--line-soft) 76%, transparent) 0);
}

.usage-context-ring span {
    color: var(--ink-1);
    font:
        700 14px/1 "IBM Plex Mono",
        monospace;
}

.usage-context-copy {
    min-width: 0;
    display: inline-flex;
    flex: 1 1 auto;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.usage-context-copy span {
    flex: 0 0 auto;
    color: var(--ink-muted);
    font-size: 9px;
    line-height: 1.1;
}

.usage-context-copy strong {
    flex: 0 0 auto;
    font:
        700 10px/1.1 "IBM Plex Mono",
        monospace;
    overflow-wrap: anywhere;
}

.usage-context-copy small {
    flex: 0 0 auto;
    color: var(--ink-2);
    font-size: 9px;
    line-height: 1.1;
}

.usage-cache-hit-inline {
    min-width: max-content;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    color: var(--ink-muted);
    font-size: 9px;
    line-height: 1.1;
    white-space: nowrap;
}

.usage-cache-hit-inline strong {
    color: var(--ink-1);
    font:
        700 10px/1.1 "IBM Plex Mono",
        monospace;
}

.usage-popover-section {
    margin-top: 6px;
}

.usage-popover-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 4px 3px 0;
}

.usage-popover-section h3 {
    margin: 0;
    color: var(--ink-2);
    font-size: 11px;
    font-weight: 700;
}

.usage-section-call-counts {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.usage-section-llm-calls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    color: var(--ink-muted);
    font-size: 9px;
    line-height: 1;
    white-space: nowrap;
}

.usage-section-llm-calls strong {
    color: var(--ink-1);
    font:
        700 10px/1 "IBM Plex Mono",
        monospace;
}

.usage-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
}

.usage-metric {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 3px 5px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 72%, transparent);
    border-radius: 7px;
    background: color-mix(in srgb, var(--bg-elev) 68%, transparent);
}

.usage-metric dt {
    margin: 0;
    overflow: hidden;
    color: var(--ink-muted);
    font-size: 9px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.usage-metric dd {
    margin: 0;
    color: var(--ink-1);
    font:
        700 10px/1.15 "IBM Plex Mono",
        monospace;
    overflow-wrap: anywhere;
}

.usage-popover-empty {
    margin: 10px 0 2px;
    color: var(--ink-muted);
    font-size: 12px;
}

.inline-icon {
    vertical-align: middle;
}

/* ========================================
   Status Pill
   ======================================== */
.status-pill {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    border-radius: 10px;
    position: relative;
    padding: 6px 11px 6px 24px;
    font:
        600 11px/1.25 "IBM Plex Mono",
        monospace;
    letter-spacing: 0.02em;
    white-space: nowrap;
    word-break: keep-all;
    writing-mode: horizontal-tb;
    color: var(--ink-2);
}

.status-pill::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transform: translateY(-50%);
    background: color-mix(in srgb, var(--ink-muted) 86%, white);
}

.status-pill.is-idle {
    border-color: color-mix(in srgb, var(--line-soft) 76%, transparent);
    color: var(--ink-2);
}

.status-pill.is-idle::before {
    background: color-mix(in srgb, var(--ink-muted) 90%, white);
}

.status-pill.is-ws-ready::before {
    background: var(--accent-lime);
}

.status-pill.is-running {
    color: var(--accent-electric-strong);
}

.status-pill.is-running::before {
    background: var(--accent-electric);
    animation-name: flash;
    animation-duration: 1s;
    animation-iteration-count: infinite;
}

.status-pill.is-error {
    border-color: color-mix(in srgb,
            var(--accent-danger) 55%,
            var(--line-soft));
    color: color-mix(in srgb, var(--accent-danger) 80%, #3e1120);
}

.status-pill.is-error::before {
    background: var(--accent-danger);
}

.status-pill.is-success {
    border-color: color-mix(in srgb, var(--accent-lime) 46%, var(--line-soft));
    color: color-mix(in srgb, var(--accent-lime) 82%, #0f3f35);
}

.status-pill.is-success::before {
    background: var(--accent-lime);
}

.styled-scroll {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--line-strong) 65%, transparent) transparent;
}

.styled-scroll::-webkit-scrollbar,
.messages-scroll::-webkit-scrollbar,
.scroll::-webkit-scrollbar,
.list::-webkit-scrollbar,
.mention-suggest-list::-webkit-scrollbar,
.tool-detail::-webkit-scrollbar,
.tool-call-inline::-webkit-scrollbar,
.tool-call-result::-webkit-scrollbar,
.tool-code::-webkit-scrollbar,
.debug-log::-webkit-scrollbar,
.event-popover-body::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.styled-scroll::-webkit-scrollbar-thumb,
.messages-scroll::-webkit-scrollbar-thumb,
.scroll::-webkit-scrollbar-thumb,
.list::-webkit-scrollbar-thumb,
.mention-suggest-list::-webkit-scrollbar-thumb,
.tool-detail::-webkit-scrollbar-thumb,
.tool-call-inline::-webkit-scrollbar-thumb,
.tool-call-result::-webkit-scrollbar-thumb,
.tool-code::-webkit-scrollbar-thumb,
.debug-log::-webkit-scrollbar-thumb,
.event-popover-body::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line-strong) 65%, transparent);
    background-clip: content-box;
}

/* ========================================
   Conversation Stage & Timeline
   ======================================== */
.conversation-stage {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    animation: fade-slide-in 0.5s 0.08s ease both;
}

.messages-scroll {
    height: 100%;
    overflow-y: auto;
    padding: 20px 20px 26px;
    background: transparent;
    scroll-behavior: smooth;
}

/* Scrollbar styles */

.timeline-empty {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
}

.timeline-stack {
    position: relative;
    min-height: 100%;
    width: 100%;
    max-width: 800px;
    margin: auto;
}

.timeline-stack.is-empty {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.timeline-lane {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.timeline-row {
    position: relative;
    animation: node-rise 0.28s ease both;
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease,
        background 0.2s ease;
}

.timeline-row.is-debug-target {
    border-radius: 18px;
    background: color-mix(in srgb, #f7e4a3 18%, transparent);
    box-shadow:
        0 0 0 2px color-mix(in srgb, #e2c66c 72%, transparent),
        0 14px 28px color-mix(in srgb, #e2c66c 16%, transparent);
    transform: translateY(-1px);
}

.timeline-row-user {
    margin-left: auto;
    max-width: 87%;
    padding-left: 20px;
}

.timeline-user-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.timeline-user-attachments {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.timeline-user-attachments.is-multi {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 8px;
}

.attachment-card {
    position: relative;
    min-width: 0;
    max-width: 100%;
}

.attachment-card.is-interactive {
    cursor: pointer;
}

.attachment-card.is-interactive:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent-electric) 78%, white);
    outline-offset: 3px;
    border-radius: 20px;
}

.attachment-card-image-shell {
    width: 100%;
    height: 100%;
}

.attachment-card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: color-mix(in srgb, var(--bg-input) 86%, var(--bg-elev-2));
}

.attachment-card.is-image {
    border: 1px solid color-mix(in srgb, var(--line-soft) 96%, transparent);
    background: color-mix(in srgb, white 96%, var(--bg-input));
    box-shadow: var(--shadow-soft);
}

.attachment-card-image-badge {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background: rgba(17, 18, 20, 0.72);
    backdrop-filter: blur(10px);
}

.attachment-card-file-shell {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 16px 9px 10px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 96%, transparent);
    background: color-mix(in srgb, var(--bg-elev-2) 94%, var(--accent-soft));
}

.attachment-card-file-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(180deg, #398af7, #1c73ea);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.attachment-card-file-icon.is-thumbnail {
    overflow: hidden;
    padding: 0;
    background: color-mix(in srgb, white 92%, var(--bg-input));
}

.attachment-card-file-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-card[data-attachment-kind="image"] .attachment-card-file-icon {
    background: linear-gradient(180deg, #2fbc8a, #0ea172);
}

.attachment-card-file-icon .material-symbols-rounded {
    font-size: 20px;
}

.attachment-card-file-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.attachment-card-title,
.attachment-card-subtitle {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-card-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink-1);
}

.attachment-card-subtitle {
    font-size: 10px;
    line-height: 1.2;
    color: var(--ink-muted);
}

.attachment-card-trailing {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: color-mix(in srgb, var(--ink-muted) 88%, #818892 12%);
}

.attachment-card-trailing .material-symbols-rounded {
    font-size: 17px;
}

.attachment-card-compact .attachment-card-file-shell {
    gap: 10px;
    padding: 9px 11px 9px 10px;
    border-radius: 16px;
}

.attachment-card-compact .attachment-card-file-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.attachment-card-compact .attachment-card-file-icon .material-symbols-rounded {
    font-size: 17px;
}

.attachment-card-compact .attachment-card-title {
    font-size: 12px;
}

.attachment-card-compact .attachment-card-subtitle {
    font-size: 10px;
}

.attachment-card.is-uploading .attachment-card-file-shell {
    border-color: color-mix(in srgb,
            var(--accent-electric) 26%,
            rgba(214, 220, 229, 0.92));
    background: linear-gradient(180deg,
            color-mix(in srgb, white 96%, var(--accent-soft)),
            color-mix(in srgb, white 92%, var(--accent-soft)));
}

.attachment-card.is-error .attachment-card-file-shell {
    border-color: color-mix(in srgb,
            var(--accent-danger) 34%,
            rgba(214, 220, 229, 0.92));
    background: linear-gradient(180deg,
            color-mix(in srgb, white 96%, rgba(211, 59, 88, 0.08)),
            color-mix(in srgb, white 92%, rgba(211, 59, 88, 0.12)));
}

.attachment-card.is-error .attachment-card-file-icon {
    background: linear-gradient(180deg, #f26d89, #d93b58);
}

.attachment-card-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50%;
    padding: 0;
    color: #fff;
    background: rgba(17, 18, 20, 0.96);
    box-shadow: 0 8px 18px rgba(17, 18, 20, 0.18);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.attachment-card-remove:hover {
    transform: scale(1.04);
    box-shadow: 0 10px 22px rgba(17, 18, 20, 0.24);
}

.attachment-card-remove .material-symbols-rounded {
    font-size: 15px;
}

.attachment-card-composer .attachment-card-remove {
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-width: 1.5px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.88);
    transition:
        opacity 0.16s ease,
        visibility 0.16s ease,
        transform 0.16s ease,
        box-shadow 0.18s ease;
}

.attachment-card-composer:hover .attachment-card-remove {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
}

.attachment-card-timeline.is-image {
    width: clamp(142px, 22vw, 208px);
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
}

.attachment-card-timeline.is-file {
    width: min(100%, 340px);
}

.attachment-card-timeline.attachment-card-compact.is-file {
    width: min(100%, 260px);
}

.attachment-card-timeline.attachment-card-compact .attachment-card-file-shell {
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.98),
            rgba(248, 248, 250, 0.96));
}

.attachment-card-timeline.attachment-card-compact .attachment-card-file-icon {
    color: #ef9a4e;
    background: linear-gradient(180deg, #fff5ea, #ffe7d7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.attachment-card-timeline .attachment-card-title {
    font-size: 14px;
}

.attachment-card-timeline .attachment-card-subtitle {
    font-size: 11px;
}

.timeline-user-bubble {
    border-radius: 14px 14px 4px 14px;
    background: var(--accent);
    color: #f8fcff;
    box-shadow: 0 6px 16px rgba(38, 99, 235, 0.18);
    padding: 10px 14px;
}

.timeline-user-bubble .timeline-text {
    color: #f8fcff;
}

.timeline-user-bubble.is-command {
    width: fit-content;
    max-width: min(100%, 720px);
}

.timeline-command-label {
    margin-top: 9px;
    font:
        700 11px/1 "IBM Plex Mono",
        monospace;
    color: var(--accent-electric-strong);
    letter-spacing: 0.06em;
    text-transform: uppercase;

    &:empty {
        display: none;
    }
}

.timeline-row-flow {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.timeline-marker {
    position: relative;
    width: 16px;
    min-height: 16px;
    margin-top: 4px;
}

.timeline-marker::before {
    content: none;
}

/* Timeline icons */
.node-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: var(--ink-muted);
    z-index: 2;
}

.node-icon .material-symbols-rounded {
    font-size: 18px;
}

.node-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.node-icon-assistant {
    color: var(--accent-electric);
}

.node-icon-steer {
    color: var(--accent-electric);
}

.node-icon-thinking {
    color: var(--accent-warn);
}

.node-icon-awaiting-answer {
    color: var(--accent-warn);
}

.node-icon-tool {
    color: var(--accent-electric-strong);
}

.node-icon-content {
    color: var(--accent-lime);
}

.node-icon-alert {
    color: var(--accent-danger);
}

.timeline-flow-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.timeline-row-time {
    font-size: 10px;
    line-height: 1;
    color: var(--ink-muted);
    letter-spacing: 0.02em;
}

.timeline-run-group {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-run-group::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 1px;
    transform: translateX(-0.5px);
    background: color-mix(in srgb, var(--line-soft) 100%, transparent);
}

.timeline-run-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-task-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-task-group-header {
    appearance: none;
    padding: 5px 0;
    cursor: pointer;
}

.timeline-task-group-header:hover .material-symbols-rounded {
    opacity: 1;
}

.timeline-task-group-header.is-expanded .material-symbols-rounded {
    opacity: 1;
}

.timeline-task-group-header .material-symbols-rounded {
    font-size: 18px;
    flex: 0 0 auto;
    opacity: 0;
}

.timeline-task-group-agent {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    max-width: 160px;
}

.timeline-task-group-agent-avatar {
    flex: 0 0 auto;
}

.timeline-task-group-agent-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
}

.timeline-task-group-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
}

.timeline-task-group-duration {
    flex: 0 0 auto;
    color: var(--ink-muted);
    font-size: 11px;
    line-height: 1;
}

@keyframes timeline-task-status-flash {

    0%,
    50%,
    100% {
        opacity: 1;
    }

    25%,
    75% {
        opacity: 0;
    }
}

.timeline-task-group .timeline-task-group-status {
    flex: 0 0 auto;
}

.timeline-task-group .timeline-task-group-status.is-running {
    animation: timeline-task-status-flash 1s infinite;
    background: var(--accent-electric);
}

.timeline-task-group .timeline-task-group-status.is-completed {
    background: var(--accent-lime);
}

.timeline-task-group .timeline-task-group-status.is-failed {
    background: var(--accent-danger);
}

.timeline-task-group .timeline-task-group-status.is-canceled {
    background: var(--accent-warn);
}

.timeline-task-group-error {
    margin-left: 34px;
    color: color-mix(in srgb, var(--accent-danger) 82%, var(--ink-1));
    font-size: 12px;
    line-height: 1.45;
    word-break: break-word;
}

.timeline-task-group-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-run-mainline {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-run-time {
    font-size: 10px;
    line-height: 1;
    color: var(--ink-muted);
    letter-spacing: 0.02em;
}

.timeline-meta-row,
.timeline-run-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    min-width: 0;
}

.timeline-run-meta {
    margin-left: 24px;
}

.timeline-meta-actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
}

.timeline-meta-btn {
    min-height: 22px !important;
    min-width: 22px !important;
    width: 22px !important;
    padding: 0 6px !important;
    border-radius: 999px !important;
    color: var(--ink-muted);
}

.timeline-meta-btn .ui-btn-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.timeline-meta-btn .material-symbols-rounded {
    font-size: 14px;
}

.timeline-meta-btn.is-downvoted,
.timeline-meta-btn.is-active {
    color: color-mix(in srgb, var(--accent-danger) 78%, var(--ink-1));
    background: color-mix(in srgb, var(--accent-danger) 12%, transparent);
}

.timeline-row-time,
.timeline-run-time {
    margin-left: auto;
    padding-left: 8px;
    flex: 0 0 auto;
}

.timeline-text {
    font-size: 13px;
    line-height: 1.58;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--ink-1);
}

.timeline-markdown {
    white-space: normal;
}

.timeline-markdown> :first-child {
    margin-top: 0;
}

.timeline-markdown> :last-child {
    margin-bottom: 0;
}

.timeline-markdown p,
.timeline-markdown ul,
.timeline-markdown ol,
.timeline-markdown pre,
.timeline-markdown blockquote {
    margin: 0 0 9px;
}

.timeline-markdown table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 0 0 12px;
    background: color-mix(in srgb, var(--bg-elev-2) 92%, transparent);
}

.timeline-markdown th,
.timeline-markdown td {
    border: 1px solid color-mix(in srgb, var(--line-soft) 88%, transparent);
    padding: 8px 10px;
    vertical-align: top;
    text-align: left;
}

.timeline-markdown thead th {
    font-weight: 600;
    background: color-mix(in srgb, var(--bg-input) 84%, var(--bg-elev-2));
}

.timeline-markdown ul,
.timeline-markdown ol {
    padding-left: 22px;
}

.timeline-markdown pre {
    overflow-x: auto;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 88%, transparent);
    background: color-mix(in srgb, var(--bg-input) 86%, var(--bg-elev-2));
    line-height: 1.48;
}

.timeline-markdown code {
    font-family: "IBM Plex Mono", monospace;
}

.timeline-markdown a {
    color: var(--accent-electric-strong);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.timeline-markdown img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--line-soft);
}

.timeline-markdown .markdown-echarts {
    width: 100%;
    min-height: 180px;
}

.timeline-markdown .markdown-echarts-error {
    display: flex;
    min-height: 120px;
    align-items: center;
    justify-content: center;
    padding: 16px;
    color: var(--danger-strong);
    background: color-mix(in srgb, var(--danger-soft) 18%, var(--bg-elev-2));
}

.timeline-markdown .markdown-mermaid {
    width: 100%;
    overflow: hidden;
}

.timeline-markdown .markdown-mermaid-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.timeline-markdown .markdown-mermaid-render-status {
    margin-right: auto;
    color: var(--ink-3);
    font-size: 12px;
}

.timeline-markdown .markdown-mermaid-zoom {
    min-width: 44px;
    color: var(--ink-3);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.timeline-markdown .markdown-mermaid-viewport {
    display: block;
    width: 100%;
    min-height: 160px;
    max-height: min(72vh, 980px);
    overflow: auto;
    padding: 14px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.timeline-markdown .markdown-mermaid-viewport:focus-visible {
    outline: 2px solid var(--accent-electric);
    outline-offset: -3px;
}

.timeline-markdown .markdown-mermaid-viewport.is-dragging {
    cursor: grabbing;
}

.timeline-markdown .markdown-mermaid-svg {
    display: block;
    width: max(560px, calc(var(--mermaid-zoom, 1) * 100%));
    margin: 0 auto;
}

.timeline-markdown .markdown-mermaid-svg svg {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0 auto;
}

.timeline-markdown .markdown-mermaid-status {
    display: flex;
    min-height: 120px;
    align-items: center;
    justify-content: center;
    color: var(--ink-3);
}

html[data-theme="dark"] .timeline-markdown .markdown-mermaid {
    border-color: color-mix(in srgb, var(--line-soft) 88%, transparent);
    background: color-mix(in srgb, var(--bg-elev-2) 96%, transparent);
    box-shadow: none;
}

html[data-theme="dark"] .timeline-markdown .markdown-mermaid-toolbar {
    border-bottom-color: color-mix(in srgb, var(--line-soft) 88%, transparent);
    background: color-mix(in srgb, var(--bg-input) 74%, var(--bg-elev-2));
}

.timeline-markdown .katex-display {
    overflow-x: auto;
    overflow-y: hidden;
}

html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .current-worker-card,
html[data-theme="dark"] .status-pill {
    box-shadow: none;
}

html[data-theme="dark"] .status-pill,
html[data-theme="dark"] .chat-item,
html[data-theme="dark"] .composer-pill,
html[data-theme="dark"] .mention-suggest,
html[data-theme="dark"] .slash-command-popover,
html[data-theme="dark"] .frontend-tool-container,
html[data-theme="dark"] .worker-chat-sidebar,
html[data-theme="dark"] .worker-chat-float-btn,
html[data-theme="dark"] .attachment-card-file-shell,
html[data-theme="dark"] .attachment-card.is-image,
html[data-theme="dark"] .plan-header,
html[data-theme="dark"] .floating-plan.is-expanded .plan-list {
    border-color: color-mix(in srgb, var(--line-soft) 100%, transparent);
    background: color-mix(in srgb, var(--bg-elev-2) 98%, var(--bg-input));
}

html[data-theme="dark"] .timeline-run-group::before {
    background: color-mix(in srgb, var(--line-strong) 68%, transparent);
}

html[data-theme="dark"] .timeline-user-bubble {
    border-color: color-mix(in srgb, var(--accent-electric) 60%, transparent);
    background: linear-gradient(140deg, #2558cf, #1d4ed8);
    box-shadow: 0 6px 18px rgba(8, 24, 56, 0.28);
}

html[data-theme="dark"] .tool-call-inline,
html[data-theme="dark"] .tool-call-result,
html[data-theme="dark"] .status-line,
html[data-theme="dark"] .event-row,
html[data-theme="dark"] .attachment-preview-media-shell,
html[data-theme="dark"] .attachment-preview-frame {
    background: color-mix(in srgb, var(--bg-elev-1) 92%, var(--bg-elev-2));
    border-color: color-mix(in srgb, var(--line-soft) 100%, transparent);
}

html[data-theme="dark"] .composer-pill {
    background: color-mix(in srgb, var(--bg-elev-2) 98%, var(--bg-elev-1));
    box-shadow: none;
}

html[data-theme="dark"] .composer-control-input,
html[data-theme="dark"] .ui-input,
html[data-theme="dark"] .awaiting-free-text {
    background: color-mix(in srgb,
            var(--bg-elev-1) 96%,
            var(--bg-elev-2)) !important;
    border-color: color-mix(in srgb,
            var(--line-soft) 100%,
            transparent) !important;
}

html[data-theme="dark"] .send-btn {
    box-shadow: 0 6px 16px rgba(10, 24, 56, 0.34);
}

html[data-theme="dark"] .voice-chat-panel {
    border-color: color-mix(in srgb, var(--line-soft) 100%, transparent);
    background:
        radial-gradient(circle at 100% 0%,
            color-mix(in srgb, var(--voice-accent) 8%, transparent),
            transparent 24%),
        linear-gradient(180deg,
            color-mix(in srgb, var(--bg-elev-2) 98%, transparent),
            color-mix(in srgb, var(--bg-elev-1) 96%, transparent));
    box-shadow: none;
}

html[data-theme="dark"] .voice-chat-panel::before,
html[data-theme="dark"] .voice-chat-panel::after {
    opacity: 0.6;
}

html[data-theme="dark"] .voice-chat-orb,
html[data-theme="dark"] .voice-chat-status,
html[data-theme="dark"] .voice-chat-worker,
html[data-theme="dark"] .voice-chat-summary-grid,
html[data-theme="dark"] .voice-chat-connection {
    border-color: color-mix(in srgb, var(--line-soft) 100%, transparent);
    background: color-mix(in srgb, var(--bg-elev-1) 92%, var(--bg-elev-2));
    box-shadow: none;
}

html[data-theme="dark"] .voice-chat-snippet-user,
html[data-theme="dark"] .voice-chat-snippet-assistant,
html[data-theme="dark"] .voice-chat-snippet {
    background: transparent;
}

html[data-theme="dark"] .timeline-markdown table,
html[data-theme="dark"] .timeline-markdown pre,
html[data-theme="dark"] .timeline-markdown blockquote {
    background: color-mix(in srgb, var(--bg-elev-1) 94%, var(--bg-elev-2));
    border-color: color-mix(in srgb, var(--line-soft) 100%, transparent);
}

html[data-theme="dark"] .timeline-markdown th,
html[data-theme="dark"] .timeline-markdown td,
html[data-theme="dark"] .timeline-markdown img {
    border-color: color-mix(in srgb, var(--line-soft) 100%, transparent);
}

html[data-theme="dark"] .timeline-markdown .markdown-echarts {
    border-color: color-mix(in srgb, var(--line-soft) 100%, transparent);
    background: rgba(255, 255, 255, 0.035);
}

html[data-theme="dark"] .timeline-markdown thead th {
    background: color-mix(in srgb, var(--bg-elev-1) 100%, var(--bg-elev-2));
}

html[data-theme="dark"] .timeline-markdown code:not(pre code) {
    padding: 0.15em 0.42em;
    border-radius: 6px;
    background: color-mix(in srgb, var(--bg-elev-1) 100%, var(--bg-elev-2));
    color: var(--ink);
}

html[data-theme="dark"] .timeline-markdown a {
    color: var(--accent-strong);
}

html[data-theme="dark"] .worker-chat-float-btn:hover {
    box-shadow: none !important;
}

.system-alert {
    border: 1px solid color-mix(in srgb, var(--accent-danger) 28%, var(--line-soft));
    background: color-mix(in srgb, var(--accent-danger) 12%, var(--bg-elev-2));
    color: color-mix(in srgb, var(--accent-danger) 75%, #3f0f1e);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    white-space: pre-wrap;
}

.system-alert-message {
    white-space: pre-wrap;
}

.system-alert-details {
    margin-top: 8px;
    color: var(--ink-2);
    white-space: normal;
}

.system-alert-details summary {
    cursor: pointer;
    color: var(--ink-muted);
    font-size: 11px;
}

.system-alert-details dl {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 4px 8px;
    margin: 8px 0 0;
}

.system-alert-details dt {
    color: var(--ink-muted);
    font-size: 11px;
}

.system-alert-details dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    white-space: pre-wrap;
}

.system-alert-details pre {
    margin: 8px 0 0;
    max-height: 220px;
    overflow: auto;
    border-radius: 6px;
    background: color-mix(in srgb, var(--bg-elev-1) 88%, transparent);
    padding: 8px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    white-space: pre-wrap;
}

/* ========================================
   Thinking Block
   ======================================== */
.thinking-trigger {
    min-height: 26px !important;
    border: 0;
    background: transparent !important;
    padding: 0 !important;
    color: var(--ink-muted);
    font-size: 12px;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.thinking-trigger:hover {
    color: var(--ink-2);
    box-shadow: none;

    .chevron {
        opacity: 1;
    }
}

.thinking-trigger .chevron {
    display: inline-flex;
    transition:
        transform 0.22s ease,
        opacity 0.22s ease;
    opacity: 0;
}

.thinking-trigger.is-open .chevron {
    transform: rotate(90deg);
    opacity: 1;
}

.thinking-detail {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    padding: 0;
    color: var(--ink-2);
    font-size: 11px;
    line-height: 1.5;
    white-space: pre-wrap;
    transition:
        max-height 0.28s ease,
        opacity 0.24s ease,
        margin-top 0.24s ease,
        padding 0.24s ease;
}

.thinking-detail.is-open {
    max-height: 50vh;
    opacity: 1;
    margin-top: 6px;
    padding: 0;
    overflow: auto;
}

/* ========================================
   Content Viewport
   ======================================== */
.timeline-content-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.timeline-content-viewport {
    overflow: hidden;
}

.timeline-content-viewport-body {
    min-height: 58px;
}

.timeline-content-viewport-frame {
    width: 100%;
    height: min(320px, 48vh);
    border: 0;
    pointer-events: none;
}

.status-line {
    border: 1px dashed color-mix(in srgb, var(--line-strong) 62%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg-input) 82%, var(--bg-elev-2));
    color: var(--ink-muted);
    font-size: 11px;
    line-height: 1.4;
    padding: 7px 8px;
}

.timeline-tts-voice {
    margin: 8px 0;
}

.tts-voice-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tts-voice-toolbar .tts-voice-pill {
    width: auto;
}

.tts-voice-replay {
    flex: 0 0 auto;
}

.tts-voice-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--accent-electric) 24%, var(--line-soft));
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-elev-2) 94%, var(--bg-input));
    padding: 8px 10px;
    cursor: pointer;
}

.tts-voice-label {
    font-size: 12px;
    color: var(--accent-electric-strong);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tts-voice-status {
    margin-left: auto;
    font-size: 12px;
    color: var(--ink-2);
}

.tts-voice-pill .chevron {
    display: inline-flex;
    color: var(--ink-muted);
    transition: transform 0.2s ease;
}

.tts-voice-pill[aria-expanded="true"] .chevron {
    transform: rotate(90deg);
}

.tts-voice-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
}

.tts-voice-detail.is-open {
    max-height: 260px;
    margin-top: 8px;
}

.tts-voice-text {
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg-input) 86%, var(--bg-elev-2));
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.terminal-dock {
    width: 100%;
    overflow: hidden;
    border-top: 1px solid var(--border);
}

.ant-typography {
    color: inherit;
    font-size: inherit;
}

.ant-badge .ant-badge-multiple-words {
    padding: 0 4px;
}

.timeline-row[data-kind="planning"] {
    margin: 20px 0;
}

.timeline-planning-collapse {
    background-color: color-mix(in srgb, var(--bg-input) 86%, var(--bg-elev-2));
}

.timeline-planning-collapse .ant-collapse-extra .material-symbols-rounded {
    font-size: 14px;
}

.timeline-planning-collapse .ant-collapse-extra .ui-btn.is-icon-only {
    width: 22px;
    min-width: 22px;
}

.timeline-planning-collapse .ant-collapse-extra .ui-btn.ui-btn-sm {
    min-height: 22px;
}

.timeline-planning-collapse.ant-collapse.ant-collapse-icon-position-end>.ant-collapse-item>.ant-collapse-header .ant-collapse-expand-icon {
    padding-left: 6px;
}

.timeline-planning-collapse.ant-collapse .ant-collapse-content>.ant-collapse-content-box {
    padding: 0 16px 16px;
    position: relative;
}

/* xterm viewport 背景跟随主题 */
html[data-theme="light"] .xterm .xterm-viewport {
    background-color: #fafafa;
}

html[data-theme="dark"] .xterm .xterm-viewport {
    background-color: #181818;
}

html[data-theme="light"] .xterm .composition-view {
    background: #fafafa;
    color: #1d2129;
}

html[data-theme="dark"] .xterm .composition-view {
    background: #181818;
    color: #f2f3f5;
}

/* ========================================
   Tool Pill & Detail
   ======================================== */
.tool-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ink-muted) 84%, transparent);
}

@keyframes flash {

    0%,
    50%,
    100% {
        opacity: 1;
    }

    25%,
    75% {
        opacity: 0;
    }
}

.tool-trigger {
    min-height: 26px !important;
    border: 0;
    background: transparent !important;
    padding: 0 !important;
    color: var(--ink-muted);
    font-size: 12px;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: min(100%, 520px);
}

.tool-trigger .ui-btn-label {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tool-trigger:hover {
    color: var(--ink-2);
    box-shadow: none;

    .chevron {
        opacity: 1;
    }
}

.tool-trigger[data-expandable="false"] {
    cursor: default;
}

.tool-trigger .chevron {
    display: inline-flex;
    transition:
        transform 0.22s ease,
        opacity 0.22s ease;
    opacity: 0;
}

.tool-trigger.is-open .chevron {
    transform: rotate(90deg);
    opacity: 1;
}

.tool-pill-label {
    min-width: 0;
    max-width: min(46vw, 260px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-pill-duration {
    color: color-mix(in srgb, var(--ink-muted) 78%, transparent);
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    white-space: nowrap;
}

.tool-status-dot[data-tool-status="running"] {
    animation-name: flash;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    background: var(--accent-electric);
}

.tool-status-dot[data-tool-status="completed"] {
    background: var(--accent-electric);
}

.tool-status-dot[data-tool-status="success"] {
    background: var(--accent-lime);
}

.tool-status-dot[data-tool-status="failed"],
.tool-status-dot[data-tool-status="error"],
.tool-status-dot[data-tool-status="canceled"] {
    background: var(--accent-danger);
}

.tool-detail {
    display: none;
}

.tool-detail.is-open {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tool-call-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
}

.tool-call-title {
    font-size: 10px;
    font-family: "IBM Plex Mono", monospace;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.tool-call-meta {
    letter-spacing: 0.04em;
}

.tool-call-meta-status {
    position: relative;
    padding-left: 8px;
}

.tool-call-meta-status::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.55;
    transform: translateY(-50%);
}

.tool-call-card.is-grouped[data-tool-status="running"] .tool-call-meta-status,
.tool-call-card.is-grouped[data-tool-status="completed"] .tool-call-meta-status {
    color: color-mix(in srgb, var(--accent-electric) 78%, var(--ink-muted));
}

.tool-call-card.is-grouped[data-tool-status="success"] .tool-call-meta-status {
    color: color-mix(in srgb, var(--accent-lime) 72%, var(--ink-muted));
}

.tool-call-card.is-grouped[data-tool-status="failed"] .tool-call-meta-status,
.tool-call-card.is-grouped[data-tool-status="error"] .tool-call-meta-status,
.tool-call-card.is-grouped[data-tool-status="canceled"] .tool-call-meta-status {
    color: color-mix(in srgb, var(--accent-danger) 80%, var(--ink-muted));
}

.tool-call-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}
.tool-call-card {
    background: color-mix(in srgb, var(--bg-input) 86%, var(--bg-elev-2));
    border-radius: 10px;
}

.tool-call-note {
    font-size: 11px;
    line-height: 1.5;
    color: var(--ink-muted);
    white-space: pre-wrap;
}

.tool-call-inline,
.tool-call-result {
    margin: 0;
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-muted);
}

.tool-call-result .input {
    color: var(--text-main);
    margin-bottom: 8px;
}

.tool-call-result .input td {
    padding: 0;
    vertical-align: baseline;
}

.tool-call-result .input td:first-child {
    color: color-mix(in srgb, var(--accent-lime) 30%, var(--ink-muted));
    padding-right: 10px;
    white-space: nowrap;
}

.tool-call-inline {
    display: block;
    padding: 7px 9px;
    overflow-x: auto;
    white-space: nowrap;
}

.tool-call-copy {
    position: absolute;
    top: -26px;
    right: 0;
}

.tool-call-copy .ui-btn-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tool-call-copy .material-symbols-rounded {
    font-size: 14px;
}

.tool-call-copy button {
    min-height: 22px !important;
    width: 22px !important;
    min-width: 22px !important;
}
.tool-call-copy button:hover {
    color: var(--ink-2);
    box-shadow: none;
}
.tool-call-copy button[data-copy-state="copied"] {
    color: color-mix(in srgb, var(--accent-lime) 82%, var(--ink-2));
}

.tool-call-copy button[data-copy-state="error"] {
    color: color-mix(in srgb, var(--accent-danger) 86%, var(--ink-2));
}

.tool-call-result {
    padding: 10px 12px;
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(8 * 1.5em + 20px);
    word-break: break-word;
}

/* ========================================
   Frontend Tool Container
   ======================================== */
.frontend-tool-container {
    border: 1px solid color-mix(in srgb, var(--accent-electric) 26%, var(--line-soft));
    border-radius: 16px;
    background: color-mix(in srgb, var(--bg-elev-2) 96%, transparent);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    margin-bottom: 0;
}

.frontend-tool-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-bottom: 1px solid var(--line-soft);
    background: color-mix(in srgb, var(--accent-soft) 28%, transparent);
}

.frontend-tool-meta {
    font-size: 10px;
    font-family: "IBM Plex Mono", monospace;
    color: var(--ink-muted);
}

.frontend-tool-frame {
    width: 100%;
    height: min(420px, 55vh);
    border: 0;
}

.frontend-tool-status {
    padding: 6px 14px;
    font-size: 11px;
    color: var(--ink-muted);
    border-top: 1px solid var(--line-soft);
    min-height: 0;
}

.frontend-tool-status.ok {
    color: var(--accent-lime);
}

.frontend-tool-status.err {
    color: var(--accent-danger);
}

.is-frontend-active .composer-pill {
    display: none;
}

/* ========================================
   Bottom Dock & Composer
   ======================================== */
.bottom-dock {
    padding: 0 16px 16px;
}

.bottom-dock-inner {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    overflow: visible;
}

.bottom-dock-stack {
    display: flex;
    flex-direction: column;
    position: relative;
}

.bottom-dock-artifact-rail,
.bottom-dock-plan-rail {
    z-index: 5;
    padding-bottom: 4px;
}

.bottom-dock-tool-rail,
.bottom-dock-composer-rail {
    position: relative;
}

.bottom-dock-composer-rail {
    z-index: 2;
}

.app-shell.timeline-empty-layout .conversation-stage,
.app-shell.timeline-empty-layout .bottom-dock {
    flex: 1 1 0;
    min-height: 0;
}

.app-shell.timeline-empty-layout .bottom-dock {
    display: flex;
    flex-direction: column;
}

.composer-area {
    position: relative;
}

.composer-layout {
    display: flex;
    align-items: stretch;
    gap: 14px;
}

.composer-stack {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 14px;
}

.composer-pill {
    --composer-main-min-height: 84px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px 6px 6px 12px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    transition:
        box-shadow 0.22s ease,
        border-color 0.22s ease;
}

.composer-pill:focus-within {
    box-shadow: var(--shadow-medium);
}

.composer-pill textarea {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 6px 0;
    font-size: 13px;
    line-height: 1.45;
    outline: none;
    resize: none;
}

.composer-wonders {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.composer-wonders-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 0 4px;
}

.composer-wonders-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-electric-strong);
}

.composer-wonders-title {
    font-size: 13px;
    color: var(--ink-2);
}

.composer-wonders-shuffle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    margin-left: auto;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--ink-muted);
    cursor: pointer;
    transition:
        color 0.18s ease,
        transform 0.35s ease;
    flex-shrink: 0;
}

.composer-wonders-shuffle:hover,
.composer-wonders-shuffle:focus-visible {
    color: var(--ink-1);
    transform: rotate(180deg);
    outline: none;
}

.composer-wonders-shuffle .material-symbols-rounded {
    font-size: 18px;
}

.composer-wonders-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.composer-wonder-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 15px;
    background-color: transparent;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    text-align: left;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.composer-wonder-card:hover,
.composer-wonder-card:focus-visible {
    transform: translateY(-1px);
    border-color: color-mix(in srgb,
            var(--accent-electric) 42%,
            var(--line-soft));
    box-shadow:
        var(--shadow-soft),
        0 0 0 3px color-mix(in srgb, var(--accent-soft) 72%, transparent);
    outline: none;
}

.composer-wonder-index {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-muted);
}

.composer-wonder-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink-1);
    white-space: pre-wrap;
    word-break: break-word;
}

.composer-attachments-shell {
    position: relative;
}

.composer-attachments-shell.is-scrollable {
    padding: 0 30px;
}

.composer-attachments-viewport {
    min-width: 0;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.composer-attachments-viewport::-webkit-scrollbar {
    display: none;
}

.composer-attachments {
    width: max-content;
    min-width: 100%;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
}

.composer-control-field {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    flex-shrink: 0;

    &:not(:last-child)::after {
        content: "";
        display: block;
        width: 1px;
        height: 50%;
        background-color: var(--line-soft);
    }
}

.composer-control-field.is-string,
.composer-control-field.is-number,
.composer-control-field.is-date,
.composer-control-field.is-select {
    max-width: 140px;
}

.composer-control-label {
    color: var(--ink-2);
    font-size: 11px;
    font-weight: 700;
}

.composer-control-label .material-symbols-rounded {
    font-size: 15px;
    color: var(--ink-muted);
}

.composer-control-input {
    min-width: 0;
    width: min(180px, 100%);
    border: 1px solid color-mix(in srgb, var(--line-soft) 82%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bg-input) 88%, var(--bg-elev-2));
    padding: 5px 8px;
    color: var(--ink-1);
    font-size: 12px;
    line-height: 1.2;
}

.composer-control-input:focus {
    outline: none;
    border-color: var(--accent-electric);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-soft) 24%, transparent);
}

.composer-control-input:disabled {
    background: color-mix(in srgb, var(--bg-elev-2) 92%, transparent);
    color: var(--ink-muted);
}

.composer-control-toggle {
    accent-color: var(--accent-electric);
}

.composer-attachments-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--line-soft) 88%, transparent);
    border-radius: 8px;
    padding: 0;
    color: var(--ink-muted);
    background: color-mix(in srgb,
            rgba(255, 255, 255, 0.96) 96%,
            var(--bg-elev-2));
    box-shadow: 0 4px 10px rgba(17, 39, 76, 0.08);
    transform: translateY(-50%);
}

.composer-attachments-nav.is-left {
    left: 0;
}

.composer-attachments-nav.is-right {
    right: 0;
}

.composer-attachments-nav:hover:not(:disabled) {
    color: var(--ink-1);
    background: color-mix(in srgb,
            rgba(255, 255, 255, 1) 96%,
            var(--bg-elev-2));
}

.composer-attachments-nav:disabled {
    opacity: 0.35;
    cursor: default;
    box-shadow: none;
}

.composer-attachments-nav .material-symbols-rounded {
    font-size: 16px;
}

.attachment-card-composer {
    flex: 0 0 auto;
}

.attachment-card-composer.is-image {
    width: 88px;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
}

.attachment-card-composer .attachment-card-title {
    font-size: 12px;
}

.attachment-card-composer .attachment-card-subtitle {
    font-size: 10px;
}

.composer-plus-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 1;
    overflow: auto;
    align-self: center;
    white-space: nowrap;
}

.plan-toggle-btn.ui-btn.ui-btn-ghost {
    color: var(--text-muted);
}

.plan-toggle-btn.ui-btn.ui-btn-sm {
    font-size: 13px;
    padding: 0 8px;
}

.plan-toggle-btn:hover .plan-toggle-icon {
    display: none;
}

.plan-toggle-close-icon {
    font-size: 18px;
    transform: scale(.8);
}

.plan-toggle-btn:not(:hover) .plan-toggle-close-icon {
    display: none;
}

.plan-toggle-shortcut {
    font-size: 10px;
    background: var(--colorFillSecondary);
    padding: 5px 7px;
    border-radius: 6px;
    color: var(--text-sub);
}

.composer-plus-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 90%, transparent);
    background: color-mix(in srgb, var(--bg-input) 90%, var(--bg-elev-2));
    color: var(--ink-2);
    display: grid;
    place-items: center;
    padding: 0;
}

.composer-plus-btn .material-symbols-rounded {
    font-size: 18px;
}

.composer-plus-popover {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    min-width: 170px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 90%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg-elev-2) 98%, transparent);
    box-shadow: var(--shadow-medium);
    padding: 8px 10px;
    z-index: 14;
}

.send-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 0;
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: var(--accent-electric);
    box-shadow: 0 6px 16px rgba(38, 99, 235, 0.22);
    flex: 0 0 auto;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
    align-self: center;
}

.send-btn .material-symbols-rounded {
    font-size: 17px;
}

.send-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 12px rgba(22, 119, 255, 0.28);
}

.awaiting-submit-btn.ui-btn {
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
}

.composer-awaiting-shell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.composer-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: center;
}

.query-settings-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.query-settings-btn.ui-btn {
    min-height: 32px;
    max-width: 220px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.query-settings-btn .ui-btn-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.query-settings-btn .ui-btn-label>span:not(.material-symbols-rounded) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.query-settings-btn .material-symbols-rounded {
    flex: 0 0 auto;
    font-size: 14px;
}

.query-model-btn.ui-btn {
    max-width: 280px;
}

.query-model-btn.ui-btn.is-loading {
    pointer-events: auto;
}

.query-model-error {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: var(--danger, #c2410c);
}

.query-settings-menu.ant-dropdown-menu {
    font-size: 13px;
    min-width: 160px;
}

.query-settings-menu.ant-dropdown-menu-submenu {
    font-size: 13px;
}

.query-settings-menu.ant-dropdown-menu .ant-dropdown-menu-item-selected:hover {
    background-color: var(--colorFillSecondary);
}

.query-settings-menu.ant-dropdown-menu .ant-dropdown-menu-item-selected {
    color: var(--text-main);
    background-color: transparent;
}

.query-settings-menu.ant-dropdown-menu .ant-dropdown-menu-submenu-title {
    padding: 3px 6px;
}

.query-settings-menu.ant-dropdown-menu .ant-dropdown-menu-item {
    padding: 3px 6px;
}

.query-settings-menu.ant-dropdown-menu .ant-dropdown-menu-item-group-title {
    padding: 2px 5px;
}

.query-settings-menu.ant-dropdown-menu .ant-dropdown-menu-item-group-list {
    margin: 0;
}

.query-settings-submenu.ant-dropdown-menu-submenu .ant-dropdown-menu .ant-dropdown-menu-item-group-list {
    margin: 0;
    max-height: 40vh;
    overflow: auto;
}

.query-settings-menu-item {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 13px;
}

.query-settings-menu-item .material-symbols-rounded {
    font-size: 14px;
}

.composer-mode-shell {
    width: 100%;
}

.composer-mode-main {
    min-width: 0;
    display: flex;
    align-items: stretch;
}

.awaiting-panel {
    flex: 1 1 auto;
    width: 100%;
    min-height: var(--composer-main-min-height);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    background: var(--bg-card);
    box-shadow: var(--shadow-soft);
}

.awaiting-panel-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 12px;
    flex-wrap: wrap;
}

.awaiting-panel-header-main {
    display: flex;
    align-items: baseline;
    gap: 8px 12px;
    flex-wrap: wrap;
}

.awaiting-panel-header-side {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
}

.awaiting-panel-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--ink-1);
}

.awaiting-panel-caption {
    font-size: 10px;
    font-weight: 700;
    color: var(--ink-muted);
}

.awaiting-panel-form-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
}

.awaiting-timeout-badge {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.awaiting-panel-form-switcher-label {
    max-width: min(320px, 55vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-muted);
}

.awaiting-question-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.awaiting-question-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(228, 234, 243, 0.92);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
}

.awaiting-question-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-1);
    line-height: 1.5;
}

.awaiting-option-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.awaiting-option {
    min-width: min(240px, 100%);
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink-1);
    text-align: left;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.awaiting-option:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb,
            var(--accent-electric) 26%,
            var(--line-soft));
}

.awaiting-option.is-selected {
    border-color: color-mix(in srgb, var(--accent-electric) 52%, transparent);
    background: color-mix(in srgb, var(--accent-soft) 18%, #fff);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-soft) 18%, transparent);
}

.awaiting-option-label {
    font-size: 12px;
    font-weight: 700;
}

.awaiting-option-description {
    font-size: 10px;
    color: var(--ink-muted);
    line-height: 1.45;
}

.awaiting-free-text {
    border: 1px solid color-mix(in srgb, var(--line-soft) 88%, transparent) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    padding: 8px 10px !important;
}

.awaiting-panel-empty,
.awaiting-panel-error {
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.awaiting-panel-empty {
    color: var(--ink-muted);
    background: rgba(248, 250, 254, 0.92);
}

.awaiting-panel-error {
    color: var(--accent-danger);
    background: linear-gradient(180deg,
            rgba(255, 248, 249, 0.96),
            rgba(255, 239, 243, 0.96));
    border: 1px solid rgba(246, 222, 227, 0.95);
}

.awaiting-panel-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 2px;
}

.awaiting-panel-footer-hints {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.awaiting-panel-radiogroup {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
}

.awaiting-panel-option-row {
    width: 100%;
}

.awaiting-panel-option {
    flex: 1;
    min-width: 0;
    padding: 6px 0;
    border-radius: 16px;
    color: var(--text-muted);
    font-size: 12px;
    border: 1px solid transparent;
    margin-inline-end: 0;
}

.awaiting-panel-option:hover,
.awaiting-panel-option:not(.free-text):focus-within {
    background-color: var(--bg-hover);
}

.awaiting-panel-option:focus-within .awaiting-panel-option-index,
.awaiting-panel-radiogroup .ant-radio-wrapper-checked .awaiting-panel-option-index {
    background: var(--text-main);
    color: var(--bg-base);
    border-color: var(--text-main);
}
.awaiting-panel-option.free-text:focus-within{
    border-color: var(--accent);
}

.awaiting-panel-option-index {
    border-radius: 50%;
    background: var(--bg-hover);
    border: 1px solid var(--line);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.awaiting-panel-option .awaiting-panel-option-label {
    color: var(--text-main);
    font-weight: 600;
    white-space: nowrap;
}

.awaiting-panel-radiogroup .ant-radio {
    display: none;
}

.awaiting-panel-radiogroup .ant-radio-label{
    width: 100%;
}

.awaiting-panel-confirm {
    flex-shrink: 0;
}

.awaiting-panel-ignore-button {
    color: var(--text-muted);
}

.awaiting-panel-submit-line.ant-btn {
    width: 100%;
    min-height: 40px;
    height: 40px;
    justify-content: flex-start;
    padding-inline: 14px;
    border-radius: 12px;
    font-size: 12px;
}

.awaiting-panel-submit-icon {
    color: var(--accent-electric);
}

.awaiting-panel-submit-tail {
    color: var(--text-muted);
}

.awaiting-reject-reason {
    height: 40px;
    padding-inline: 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.awaiting-reject-reason-button {
    cursor: pointer;
}

.awaiting-reject-reason-button:hover {
    transform: scale(1.1);
}

.awaiting-reject-reason-icon {
    color: var(--accent-danger);
}

.awaiting-reject-reason:hover,
.awaiting-reject-reason:focus-within {
    background: color-mix(in srgb, var(--bg-base) 78%, var(--bg-elev-2));
    border-color: color-mix(in srgb,
            var(--accent-electric) 60%,
            var(--line-strong));
}

.awaiting-reject-reason input {
    padding: 0 2px;
    font-weight: normal;
    line-height: unset;
    color: var(--text-muted);
    font-size: 12px;
}

.awaiting-reject-reason input::placeholder {
    font-size: 12px;
}

.awaiting-panel-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.awaiting-panel-actions .ant-btn {
    font-size: 12px;
}

.awaiting-panel .status-line,
.awaiting-panel .system-alert {
    margin-top: 2px;
}

.composer-control-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.voice-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--line-soft) 90%, transparent);
    background: color-mix(in srgb, var(--bg-input) 92%, var(--bg-elev-2));
    display: grid;
    place-items: center;
    padding: 0;
}

.voice-btn .material-symbols-rounded {
    font-size: 17px;
}

.voice-btn.is-listening {
    border-color: color-mix(in srgb,
            var(--accent-danger) 56%,
            var(--line-soft));
    background: color-mix(in srgb, var(--accent-danger) 12%, var(--bg-elev-2));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-danger) 22%, transparent);
}

.voice-btn:disabled {
    opacity: 0.55;
}

.voice-hint {
    margin-top: 4px;
    padding: 0 8px;
    font-size: 10px;
    color: var(--ink-muted);
}

.send-btn:active {
    transform: scale(0.97);
}

.interrupt-btn {
    height: 32px;
    border-radius: 8px;
    border: 0;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 700;
    flex: 0 0 auto;
    align-self: center;
}

.interrupt-btn:hover {
    background-color: color-mix(in srgb,
            var(--accent-danger) 10%,
            transparent);
}

.interrupt-btn:disabled {
    opacity: 0.6;
}

.steer-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 0 20px;
}

.steer-queue {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.steer-preview {
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--line-soft) 96%, transparent);
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    background: color-mix(in srgb, var(--bg-elev-2) 98%, transparent);
    color: var(--ink-1);
    padding: 8px 12px 9px;
    font-size: 12px;
    display: flex;
    gap: 4px;
}

.steer-preview-icon,
.steer-preview-text {
    margin-top: 6px;
}

.steer-preview-draft {
    gap: 8px;
}

.steer-preview.is-pending {
    border-color: color-mix(in srgb,
            var(--accent-electric) 22%,
            var(--line-soft));
    background: color-mix(in srgb, var(--accent-electric) 8%, var(--bg-elev-2));
}

.steer-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.steer-preview-label {
    font-family: "IBM Plex Mono", monospace;
    font-size: 10px;
    color: var(--ink-muted);
    letter-spacing: 0.02em;
}

.steer-preview-status {
    color: var(--accent-electric);
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.steer-preview-text {
    flex: 1;
}

.steer-preview-actions {
    display: flex;
    gap: 4px;
}

.steer-preview-actions button {
    font-size: 12px;
}

.steer-primary-btn {
    background-color: var(--bg-base);
}

.steer-btn {
    height: 34px;
    border-radius: 8px;
    border: 0;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: var(--accent-electric);
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.24);
    flex: 0 0 auto;
}

.steer-btn:disabled {
    opacity: 0.6;
    box-shadow: none;
}

.steer-cancel-btn {
    min-width: 64px;
}

/* ========================================
   Mention Suggest
   ======================================== */
.mention-suggest {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    margin-bottom: 6px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 96%, transparent);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--bg-elev-2) 98%, transparent);
    box-shadow: var(--shadow-medium);
    max-height: 260px;
    overflow-y: auto;
    z-index: 10;
}

.slash-command-popover {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    max-height: min(320px, calc(100vh - 120px));
    overflow: auto;
    background-color: var(--bg-base);
}

.slash-command-popover-overlay .ant-popover-inner {
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.slash-command-popover-overlay .ant-popover-inner-content {
    padding: 0;
}

.slash-command-list {
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.slash-command-item {
    width: 100%;
    border-radius: 12px;
    text-align: left;
    justify-content: flex-start;
}

.slash-command-item.ui-btn.ui-btn-sm {
    padding: 6px 8px;
}

.slash-command-item .ui-btn-label {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
}

.slash-command-item .material-symbols-rounded {
    font-size: 15px;
}

.slash-command-item.active,
.slash-command-item:hover {
    background: var(--bg-hover);
}

.slash-command-name {
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-electric-strong);
}

.slash-command-label {
    font-size: 12px;
    color: var(--text-main);
}

.slash-command-description {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.8;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slash-command-check {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    align-self: center;
    color: var(--accent-lime);
}

.slash-command-check .material-symbols-rounded {
    font-size: 16px;
}

.mention-suggest-list {
    padding: 4px;
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: transparent;
    padding: 8px 10px;
    text-align: left;
    cursor: pointer;
}

.mention-item.active,
.mention-item:hover {
    background: var(--bg-hover);
}

.mention-key {
    font-family: "IBM Plex Mono", monospace;
    font-weight: 600;
    font-size: 12px;
    color: var(--accent-electric-strong);
}

.mention-name {
    font-size: 12px;
    color: var(--ink-muted);
}

.composer-input-wrapper {
    position: relative;
    width: 100%;
}

.composer-input-wrapper .ui-btn.is-icon-only {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    min-width: 20px;
    min-height: 20px;
    z-index: 10;
}

.composer-input-expand-arrow {
    transform: rotate(45deg) translate(0px, -4px);
}

.composer-input-expand-btn:hover .composer-input-expand-arrow,
.composer-input-expand-btn[data-expanded="true"] .composer-input-expand-arrow {
    display: none;
}

.composer-input-expand-btn:not(:hover):not([data-expanded="true"]) .material-symbols-rounded:not(.composer-input-expand-arrow) {
    display: none;
}
.composer-pill.is-voice-mode {
    padding: 6px 6px 6px 12px;
    border-color: color-mix(in srgb,
            var(--accent-electric) 16%,
            var(--line-soft));
    background:
        radial-gradient(circle at 0% 0%,
            rgba(94, 165, 255, 0.1),
            transparent 32%),
        radial-gradient(circle at 100% 100%,
            rgba(13, 191, 143, 0.08),
            transparent 36%),
        color-mix(in srgb, var(--bg-elev-2) 97%, transparent);
    box-shadow: var(--shadow-soft);
}

.voice-chat-panel {
    --voice-accent: var(--accent-electric);
    --voice-assistant-accent: #e1a05d;
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-height: var(--composer-main-min-height);
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(226, 233, 242, 0.82);
    border-radius: 16px;
    background:
        radial-gradient(circle at 6% 10%,
            rgba(255, 227, 193, 0.14),
            transparent 24%),
        radial-gradient(circle at 100% 0%,
            color-mix(in srgb, var(--voice-accent) 4%, transparent),
            transparent 28%),
        linear-gradient(160deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(250, 251, 254, 0.98) 48%,
            rgba(246, 249, 254, 0.98) 100%);
    box-shadow:
        0 18px 38px rgba(17, 39, 76, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px) saturate(112%);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: flex-start;
}

.voice-chat-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.52), transparent 24%),
        radial-gradient(circle at 82% 100%,
            color-mix(in srgb, var(--voice-accent) 3%, transparent),
            transparent 30%);
    pointer-events: none;
}

.voice-chat-panel::after {
    content: "";
    position: absolute;
    inset: auto -24px -30px auto;
    width: 132px;
    height: 92px;
    border-radius: 50%;
    background: radial-gradient(circle,
            color-mix(in srgb, var(--voice-accent) 5%, transparent),
            transparent 72%);
    pointer-events: none;
    filter: blur(10px);
}

.voice-chat-panel.is-listening {
    --voice-accent: #1f9a56;
}

.voice-chat-panel.is-speaking {
    --voice-accent: #d97a23;
}

.voice-chat-panel.is-error {
    --voice-accent: var(--accent-danger);
}

.voice-chat-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.voice-chat-panel-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.voice-chat-orb {
    position: relative;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    padding: 0 8px 7px;
    color: color-mix(in srgb, var(--voice-accent) 86%, #25425f);
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.96),
            color-mix(in srgb, var(--voice-accent) 6%, #f7fbff));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.94),
        0 6px 14px rgba(17, 39, 76, 0.04);
}

.voice-chat-orb::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 15px;
    border: 1px solid color-mix(in srgb, var(--voice-accent) 11%, transparent);
    opacity: 0;
}

.voice-chat-orb span {
    width: 3px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center bottom;
    animation: voice-eq 1.25s ease-in-out infinite;
}

.voice-chat-orb span:nth-child(1) {
    height: 9px;
    animation-delay: -0.15s;
}

.voice-chat-orb span:nth-child(2) {
    height: 15px;
    animation-delay: -0.35s;
}

.voice-chat-orb span:nth-child(3) {
    height: 11px;
    animation-delay: -0.55s;
}

.voice-chat-orb.is-listening {
    color: #1d9c57;
    background: linear-gradient(180deg,
            rgba(250, 255, 252, 0.88),
            rgba(226, 247, 235, 0.98));
}

.voice-chat-orb.is-speaking {
    color: #e07016;
    background: linear-gradient(180deg,
            rgba(255, 252, 247, 0.9),
            rgba(255, 236, 214, 0.98));
}

.voice-chat-orb.is-thinking,
.voice-chat-orb.is-connecting {
    color: var(--accent-electric);
}

.voice-chat-orb.is-error {
    color: var(--accent-danger);
    background: linear-gradient(180deg,
            rgba(255, 248, 249, 0.9),
            rgba(255, 229, 234, 0.96));
}

.voice-chat-orb.is-thinking span {
    animation-duration: 1.6s;
}

.voice-chat-orb.is-error span {
    animation: none;
    opacity: 0.78;
}

.voice-chat-orb.is-listening::after,
.voice-chat-orb.is-speaking::after,
.voice-chat-orb.is-thinking::after,
.voice-chat-orb.is-connecting::after {
    animation: voice-orb-pulse 1.8s ease-out infinite;
}

.voice-chat-panel-heading {
    min-width: 0;
    display: grid;
    gap: 0;
}

.voice-chat-panel-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
}

.voice-chat-panel-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--ink-1);
    letter-spacing: -0.03em;
}

.voice-chat-status {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    max-width: min(100%, 190px);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 9px;
    font-weight: 800;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.88),
            color-mix(in srgb, var(--voice-accent) 5%, rgba(247, 250, 255, 0.96)));
    border: 1px solid rgba(229, 235, 243, 0.86);
    color: color-mix(in srgb, var(--voice-accent) 78%, #29435f);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 4px 10px rgba(17, 39, 76, 0.025);
}

.voice-chat-status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 14%, transparent);
}

.voice-chat-status.is-listening {
    background: linear-gradient(180deg,
            rgba(250, 255, 252, 0.9),
            rgba(238, 250, 243, 0.96));
    color: #208a46;
}

.voice-chat-status.is-speaking {
    background: linear-gradient(180deg,
            rgba(255, 252, 249, 0.9),
            rgba(255, 244, 233, 0.96));
    color: #d7670f;
}

.voice-chat-status.is-thinking {
    background: linear-gradient(180deg,
            rgba(248, 252, 255, 0.9),
            rgba(239, 247, 255, 0.96));
    color: var(--accent-electric);
}

.voice-chat-status.is-error {
    background: linear-gradient(180deg,
            rgba(255, 249, 250, 0.9),
            rgba(253, 239, 243, 0.96));
    color: var(--accent-danger);
}

.voice-chat-worker {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid rgba(231, 237, 244, 0.82);
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.88),
            rgba(248, 250, 254, 0.84));
    font-size: 9px;
    font-weight: 700;
    color: var(--ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 4px 10px rgba(17, 39, 76, 0.025);
}

.voice-chat-worker strong {
    margin-left: 5px;
    color: var(--ink-1);
}

.voice-chat-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    align-items: start;
    min-height: 50px;
    border-radius: 14px;
    border: 1px solid rgba(229, 235, 243, 0.82);
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.8),
            rgba(250, 252, 255, 0.72));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 6px 14px rgba(17, 39, 76, 0.02);
}

.voice-chat-snippet {
    position: relative;
    display: grid;
    gap: 4px;
    min-width: 0;
    min-height: 50px;
    padding: 9px 12px 10px;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.18),
            rgba(255, 255, 255, 0.04));
}

.voice-chat-snippet-user {
    background: linear-gradient(180deg,
            rgba(246, 249, 255, 0.2),
            rgba(246, 249, 255, 0.04));
}

.voice-chat-snippet-assistant {
    background: linear-gradient(180deg,
            rgba(255, 249, 243, 0.22),
            rgba(255, 249, 243, 0.04));
}

.voice-chat-snippet+.voice-chat-snippet {
    border-left: 1px solid rgba(231, 237, 244, 0.8);
}

.voice-chat-snippet-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    font-weight: 800;
    color: color-mix(in srgb, var(--ink-muted) 94%, var(--voice-accent) 6%);
    letter-spacing: 0.03em;
}

.voice-chat-snippet-label::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--line-strong) 44%, transparent);
}

.voice-chat-snippet-user .voice-chat-snippet-label::before {
    background: color-mix(in srgb, var(--voice-accent) 52%, transparent);
}

.voice-chat-snippet-assistant .voice-chat-snippet-label::before {
    background: color-mix(in srgb,
            var(--voice-assistant-accent) 52%,
            transparent);
}

.voice-chat-snippet-text {
    min-height: auto;
    font-size: 12px;
    line-height: 1.4;
    color: var(--ink-1);
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    word-break: break-word;
    letter-spacing: -0.01em;
}

.voice-chat-snippet-text.is-placeholder {
    color: var(--ink-muted);
}

.voice-chat-error {
    padding: 6px 8px;
    border-radius: 10px;
    background: linear-gradient(180deg,
            rgba(255, 249, 250, 0.92),
            rgba(255, 241, 244, 0.94));
    border: 1px solid rgba(246, 221, 227, 0.92);
    font-size: 9px;
    font-weight: 600;
    color: var(--accent-danger);
    white-space: normal;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.voice-chat-panel-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.voice-chat-connection {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.86),
            rgba(248, 250, 254, 0.82));
    border: 1px solid rgba(229, 235, 243, 0.84);
    font-size: 9px;
    font-weight: 700;
    color: var(--ink-2);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 4px 10px rgba(17, 39, 76, 0.025);
}

.voice-chat-connection-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.voice-chat-connection.is-open {
    color: #208a46;
}

.voice-chat-connection.is-connecting {
    color: var(--accent-electric);
}

.voice-chat-connection.is-closed {
    color: var(--ink-muted);
}

.voice-chat-connection.is-error {
    color: var(--accent-danger);
}

.voice-chat-panel-caption {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--ink-muted);
}

.voice-mode-hint {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 72%, transparent);
    background: color-mix(in srgb, var(--bg-elev-2) 92%, #f4f9ff);
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 700;
}

.composer-mode-switch.ui-btn {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    box-shadow: none;
}

.composer-mode-switch .ui-btn-label {
    gap: 4px;
}

.composer-mode-switch .material-symbols-rounded {
    font-size: 16px;
}

.composer-mode-switch.is-voice-entry.ui-btn {
    border-color: color-mix(in srgb, #ffb168 34%, var(--line-soft));
    background:
        radial-gradient(circle at 18% 20%,
            rgba(255, 214, 173, 0.34),
            transparent 44%),
        color-mix(in srgb, var(--bg-elev-2) 94%, #fff5ea);
    color: #cd6718;
}

.composer-mode-switch.is-voice-entry.ui-btn:hover:not(:disabled) {
    border-color: color-mix(in srgb, #ff9b4f 42%, var(--line-soft));
    box-shadow: 0 8px 18px rgba(255, 155, 79, 0.14);
}

.composer-mode-switch.is-text-entry.ui-btn {
    border-color: color-mix(in srgb,
            var(--accent-electric) 18%,
            var(--line-soft));
    background: color-mix(in srgb, var(--bg-elev-2) 94%, #f6faff);
    color: var(--accent-electric-strong);
}

.composer-mode-switch.is-text-entry.ui-btn:hover:not(:disabled) {
    border-color: color-mix(in srgb,
            var(--accent-electric) 28%,
            var(--line-soft));
    box-shadow: 0 8px 18px rgba(22, 119, 255, 0.12);
}

@keyframes voice-eq {

    0%,
    100% {
        transform: scaleY(0.42);
        opacity: 0.5;
    }

    35% {
        transform: scaleY(1);
        opacity: 1;
    }

    70% {
        transform: scaleY(0.66);
        opacity: 0.7;
    }
}

@keyframes voice-orb-pulse {
    0% {
        opacity: 0.28;
        transform: scale(0.92);
    }

    72% {
        opacity: 0;
        transform: scale(1.14);
    }

    100% {
        opacity: 0;
        transform: scale(1.14);
    }
}

/* ========================================
   Artifact Panel
   ======================================== */
.floating-artifact {
    position: relative;
    width: 100%;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 4px;
    overflow: hidden;
}

.artifact-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
    flex: 0 0 auto;
}

.artifact-chevron .material-symbols-rounded {
    font-size: 18px;
}

.artifact-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
}

.artifact-item {
    flex: 0 0 220px;
    min-width: 220px;
    list-style: none;
}

.artifact-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease;
}

.artifact-link .attachment-card-file-shell {
    min-height: 0;
}

.artifact-link:hover .attachment-card-file-shell {
    border-color: color-mix(in srgb,
            var(--accent-lime) 24%,
            rgba(214, 220, 229, 0.92));
}

.artifact-actions .ui-btn.ui-btn-ghost{
    color: var(--text-muted);
}

/* ========================================
   Plan Panel
   ======================================== */
.floating-plan {
    position: relative;
    width: 100%;
    margin: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.plan-header {
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--accent-electric) 18%, var(--line-soft));
    border-radius: 16px;
    background: linear-gradient(180deg,
            color-mix(in srgb, var(--accent-soft) 52%, var(--bg-elev-2)),
            color-mix(in srgb, var(--bg-elev-2) 94%, transparent));
    padding: 9px 13px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    text-align: left;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.plan-header:hover {
    border-color: color-mix(in srgb,
            var(--accent-electric) 30%,
            var(--line-soft));
    background: linear-gradient(180deg,
            color-mix(in srgb, var(--accent-soft) 66%, var(--bg-elev-2)),
            color-mix(in srgb, var(--bg-elev-2) 96%, transparent));
    box-shadow: var(--shadow-medium);
}

.plan-title {
    flex: 0 0 auto;
    font:
        700 12px/1 "IBM Plex Mono",
        monospace;
    color: var(--ink-1);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.plan-header-badges {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 1 auto;
    min-width: 0;
}

.plan-summary-status {
    font:
        700 11px/1 "IBM Plex Mono",
        monospace;
    color: var(--accent-electric-strong);
    letter-spacing: 0.02em;
    flex: 0 0 auto;
}

.plan-overall-status {
    flex: 0 0 auto;
}

.plan-summary-text {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: var(--ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plan-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-muted);
    flex: 0 0 auto;
    margin-left: auto;
}

.plan-chevron .material-symbols-rounded {
    font-size: 18px;
}

.plan-list {
    list-style: none;
    margin: 0;
    padding: 0 8px;
    max-height: 0;
    overflow: hidden;
    border: 0 solid transparent;
    border-top-width: 0;
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-elev-2) 98%, transparent);
    opacity: 1;
    transform: none;
    pointer-events: none;
    transition:
        max-height 0.24s ease,
        padding 0.24s ease,
        opacity 0.18s ease,
        transform 0.18s ease;
}

.floating-plan.is-expanded .plan-list {
    max-height: min(320px, calc(100dvh - 220px));
    overflow: auto;
    padding: 8px;
    margin-top: 6px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 90%, transparent);
    pointer-events: auto;
}

.plan-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 7px 10px;
    font-size: 11px;
    color: var(--ink-2);
    border-radius: 6px;
}

.plan-item+.plan-item {
    margin-top: 2px;
}

.plan-item[data-status="running"] {
    background: color-mix(in srgb, var(--accent-soft) 30%, transparent);
}

.plan-item-text {
    flex: 1;
    min-width: 0;
    line-height: 1.45;
}

.plan-item-duration {
    flex-shrink: 0;
    margin-left: auto;
    font-size: 10px;
    line-height: 1.45;
    color: var(--ink-muted);
    white-space: nowrap;
}

/* ========================================
   Sidebar (Left & Right)
   ======================================== */
.left-drawer-closed .left-sidebar {
    width: var(--left-sidebar-close-width);
}

.left-sidebar {
    grid-row: 1 / -1;
    grid-column: 1;
    transform: none !important;
    position: relative !important;
    padding: 6px 0;
    gap: 6px;
}

.sidebar {
    width: var(--left-sidebar-width);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow: hidden;
    background: var(--bg-elev-1);
}

.right-sidebar {
    width: var(--right-sidebar-width);
    right: 0;
    left: auto;
    transform: translateX(100%);
    border-radius: 10px;
}

.right-sidebar-resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -5px;
    z-index: 3;
    width: 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: col-resize;
    touch-action: none;
}

.right-sidebar-resize-handle::after {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 4px;
    width: 0;
    border-radius: 999px;
    background: transparent;
    transition: outline 0.15s ease;
    outline: 4px solid transparent;
}

.right-sidebar-resize-handle:hover::after,
.right-sidebar-resize-handle:focus-visible::after,
.right-sidebar-resizing .right-sidebar-resize-handle::after {
    outline-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.right-sidebar-resize-handle:focus-visible {
    outline: none;
}

.right-sidebar-resizing {
    cursor: col-resize;
    user-select: none;
}

.right-sidebar-resizing * {
    cursor: col-resize !important;
}

.sidebar.is-open {
    transform: translateX(0);
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--line-soft) 96%, transparent);
}

.sidebar-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.sidebar-title-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--ink-muted);
    padding: 4px 8px;
    border-radius: 8px;
}

.drawer-close:hover {
    color: var(--ink-1);
    background: var(--bg-hover);
    box-shadow: none;
}

.left-actions {
    display: flex;
    gap: 6px;
    padding: 10px 16px;
}

.left-actions button {
    flex: 1;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
}

.field-label {
    display: block;
    padding: 0 16px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 4px;
}

.field-label-spaced {
    margin-top: 8px;
}

.icon-btn-fixed {
    flex-shrink: 0;
}

.text-input {
    display: block;
    width: calc(100% - 32px);
    margin: 0 16px 10px;
    padding: 7px 10px;
}

.chat-meta {
    padding: 0 16px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-meta-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.chip {
    font:
        500 10px/1 "IBM Plex Mono",
        monospace;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background: var(--bg-input);
    color: var(--ink-2);
}

.left-drawer-closed .chat-list {
    padding: 6px;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.chat-list::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.ui-list-item,
.chat-item {
    width: 100%;
    text-align: left;
    border-radius: 10px;
    background: transparent;
    padding: 10px;
    display: block;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.ui-list-item.is-dense {
    padding-top: 9px;
    padding-bottom: 9px;
}

.ui-list-item:hover,
.chat-item:hover,
.ui-list-item.is-selected,
.chat-item.is-active {
    background-color: var(--bg-hover);
}

.ui-list-item.is-loading,
.chat-item.is-loading {
    border-color: transparent !important;
    background-color: transparent !important;
    background-image: linear-gradient(90deg,
            var(--colorFillSecondary) 25%,
            var(--colorFill) 37%,
            var(--colorFillSecondary) 63%) !important;
    background-size: 400% 100%;
    animation-name: ui-list-item-loading-shimmer;
    animation-duration: 1.4s;
    animation-timing-function: ease;
    animation-iteration-count: infinite;
}

@keyframes ui-list-item-loading-shimmer {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0 50%;
    }
}

.chat-item-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-title-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 800;
    color: var(--ink-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-unread-dot {
    display: block;
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--accent-electric);
    opacity: 0;
}

.chat-unread-dot.is-unread {
    opacity: 1;
}

.chat-time {
    flex: 0 0 auto;
    font-size: 10px;
    font-family: "IBM Plex Mono", monospace;
    color: var(--ink-muted);
}

.chat-time-meta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chat-awaiting-status {
    font-size: 11px;
    color: var(--ok);
    white-space: nowrap;
    background:
        color-mix(in srgb, var(--ok) 10%, transparent);
    border-radius: 20px;
    padding: 2px 6px;
    margin-right: 5px;
}

.chat-running-status {
    animation: ui-spin 1s linear infinite;
    font-size: 14px;
    margin-right: 2px;
}

.chat-meta-line {
    margin-top: 4px;
    font-size: 12px;
    color: var(--ink-muted);
}

.chat-meta-line .ui-tag {
    max-width: 100%;
}

.chat-meta-line:last-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   Debug Panel (Right Sidebar)
   ======================================== */

.debug-panel {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.debug-panel .ant-tabs {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.debug-panel .ant-tag {
    margin-inline-end: 0;
}

.debug-panel .ant-tabs-content-holder {
    flex: 1;
    min-height: 0;
}

.debug-panel .ant-tabs-tabpane {
    height: 100%;
}

.right-sidebar-tabs {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.right-sidebar-tabs.ant-tabs-top .ant-tabs-tab-btn .ant-tabs-tab-icon:not(:last-child) {
    display: inline-flex;
    margin-inline-end: 4px;
}

.right-sidebar-tabs.ant-tabs .ant-tabs-tab-btn {
    display: flex;
    color: var(--text-muted);
}

.right-sidebar-tabs.ant-tabs .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
    display: flex;
    color: var(--text-main);
}

.right-sidebar-tabs.ant-tabs .ant-tabs-ink-bar {
    display: none;
}

.right-sidebar-tabs.ant-tabs .ant-tabs-tab+.ant-tabs-tab {
    margin: 0 0 0 20px;
}

.right-sidebar-tabs>.ant-tabs-nav {
    margin: 0;
    padding: 0 4px 0 12px;
}

.right-sidebar-tabs.ant-tabs-top>.ant-tabs-nav::before {
    display: none;
}

.right-sidebar-tabs>.ant-tabs-content-holder {
    flex: 1;
    min-height: 0;
}

.right-sidebar-tabs>.ant-tabs-content-holder>.ant-tabs-content {
    height: 100%;
}

.right-sidebar-tabs .ant-tabs-tabpane {
    height: 100%;
    min-height: 0;
}

.right-sidebar-overview {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.right-sidebar-overview-section {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.right-sidebar-overview-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.right-sidebar-overview-section-head h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-1);
}

.right-sidebar-overview-section-count {
    padding: 1px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-soft) 62%, transparent);
    color: var(--accent-electric-strong);
    font-size: 11px;
    font-weight: 700;
}

.right-sidebar-file-change-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.right-sidebar-file-change-item {
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bg-input) 78%, #fff);
    overflow: hidden;
}

.right-sidebar-file-change-row {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.right-sidebar-file-change-row:hover {
    background: color-mix(in srgb, var(--accent-soft) 38%, transparent);
}

.right-sidebar-file-change-expand {
    flex: 0 0 auto;
    font-size: 16px;
    color: var(--ink-muted);
}

.right-sidebar-file-change-icon {
    flex: 0 0 auto;
    font-size: 16px;
    color: var(--ink-muted);
}

.right-sidebar-file-change-path-wrap {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.right-sidebar-file-change-path {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font:
        11px/1.35 "IBM Plex Mono",
        monospace;
    color: var(--ink-1);
}

.right-sidebar-file-change-run {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font:
        10px/1.25 "IBM Plex Mono",
        monospace;
    color: var(--ink-muted);
}

.right-sidebar-file-change-stats {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font:
        700 11px/1.2 "IBM Plex Mono",
        monospace;
    white-space: nowrap;
}

.right-sidebar-file-change-stats.is-jumping .right-sidebar-file-change-add,
.right-sidebar-file-change-stats.is-jumping .right-sidebar-file-change-delete {
    animation: right-sidebar-file-change-jump 560ms cubic-bezier(.2, .72, .18, 1);
    transform-origin: center bottom;
}

.right-sidebar-file-change-stats.is-jumping .right-sidebar-file-change-delete {
    animation-delay: 40ms;
}

.right-sidebar-file-change-add {
    color: var(--ok);
}

.right-sidebar-file-change-delete {
    color: var(--danger);
}

.right-sidebar-file-change-diff {
    width: 100%;
    min-width: 0;
    border-top: 1px solid var(--line-soft);
    background: color-mix(in srgb, var(--bg-surface) 86%, transparent);
}

.right-sidebar-file-diff-status,
.right-sidebar-file-diff-empty {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    color: var(--ink-muted);
    font-size: 12px;
}

.right-sidebar-file-diff-status.is-error {
    color: var(--danger);
}

.right-sidebar-file-diff-spinner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--ink-muted) 22%, transparent);
    border-top-color: var(--accent-electric);
    animation: ui-spin 900ms linear infinite;
}

.right-sidebar-file-diff {
    max-height: 360px;
    overflow: auto;
    padding: 6px 0;
    font:
        11px/1.45 "IBM Plex Mono",
        monospace;
}

.right-sidebar-file-diff-line {
    min-width: max-content;
    display: grid;
    grid-template-columns: 38px 38px 18px minmax(220px, 1fr);
    align-items: stretch;
}

.right-sidebar-file-diff-line.is-add {
    background: color-mix(in srgb, var(--ok) 10%, transparent);
}

.right-sidebar-file-diff-line.is-delete {
    background: color-mix(in srgb, var(--danger) 10%, transparent);
}

.right-sidebar-file-diff-no,
.right-sidebar-file-diff-marker {
    user-select: none;
    color: var(--ink-muted);
    text-align: right;
    padding: 1px 6px;
}

.right-sidebar-file-diff-marker {
    text-align: center;
}

.right-sidebar-file-diff-line.is-add .right-sidebar-file-diff-marker {
    color: var(--ok);
}

.right-sidebar-file-diff-line.is-delete .right-sidebar-file-diff-marker {
    color: var(--danger);
}

.right-sidebar-file-diff-code {
    min-width: 0;
    padding: 1px 10px 1px 4px;
    color: var(--ink-1);
    background: transparent;
    white-space: pre;
}

@keyframes right-sidebar-file-change-jump {
    0% {
        transform: translateY(0) scale(1);
        filter: brightness(1);
    }
    35% {
        transform: translateY(-4px) scale(1.14);
        filter: brightness(1.15);
    }
    70% {
        transform: translateY(1px) scale(.98);
        filter: brightness(1.04);
    }
    100% {
        transform: translateY(0) scale(1);
        filter: brightness(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .right-sidebar-file-change-stats.is-jumping .right-sidebar-file-change-add,
    .right-sidebar-file-change-stats.is-jumping .right-sidebar-file-change-delete,
    .right-sidebar-file-diff-spinner {
        animation: none;
    }
}

.right-sidebar-empty {
    padding: 14px 12px;
    border: 1px dashed var(--line-soft);
    border-radius: 8px;
    color: var(--ink-muted);
    font-size: 12px;
    text-align: center;
}

.right-sidebar-artifact-list {
    padding: 0;
    overflow: visible;
}

.artifact-drawer-panel {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.artifact-drawer-list {
    margin: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.artifact-drawer-item {
    min-width: 0;
    list-style: none;
}

.artifact-drawer-item .attachment-card-file-shell {
    flex-wrap: nowrap;
}

.attachment-preview-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.attachment-preview-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid var(--line-soft);
}

.attachment-preview-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.attachment-preview-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: var(--ink-1);
}

.attachment-preview-meta {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    color: var(--ink-muted);
}

.attachment-preview-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.attachment-preview-body .status-line {
    margin: 10px;
}

.attachment-preview-video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-input) 82%, #fff);
}

.attachment-preview-frame {
    width: 100%;
    flex: 1;
    min-height: 480px;
    border: 0;
}

.attachment-preview-text {
    margin: 0;
    padding: 14px;
    flex: 1;
    min-height: 100%;
    overflow: auto;
    color: var(--ink-1);
    font:
        12px/1.6 "IBM Plex Mono",
        monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.attachment-preview-media-shell {
    padding: 18px 14px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-input) 82%, #fff);
}

.attachment-preview-audio {
    width: 100%;
}

.attachment-preview-note {
    padding: 0 12px 12px;
    font-size: 11px;
    line-height: 1.5;
    color: var(--ink-muted);
}

.debug-panel .scroll,
.debug-panel .list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.debug-events-tab {
    height: 100%;
    overflow-y: auto;
    padding-bottom: 8px;
}

.mono {
    font-family: "IBM Plex Mono", monospace;
}

.left-sidebar-buttons {
    padding: 0 6px;
}

.left-sidebar-buttons .ui-btn.ui-btn-sm {
    padding: 6px 2px;
    flex: 1;
    min-width: 0;
}

.left-sidebar-buttons .ant-badge .ant-badge-count {
    color: var(--accent);
    background-color: var(--accent-soft);
    font-size: 10px;
}

.left-sidebar-buttons .ui-btn-label {
    gap: 4px;
}

/* Events */
.event-row {
    position: relative;
    padding: 8px 10px 8px 12px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 88%, transparent);
    border-radius: 10px;
    font-size: 12px;
    transition:
        border-color 0.16s ease,
        background 0.16s ease,
        transform 0.16s ease;
}

.event-row>strong {
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-row.is-clickable {
    cursor: pointer;
}

.event-row.is-clickable:hover {
    border-color: inherit;
}

.event-row.event-row {
    margin-top: 6px;
}

.event-row-time {
    font-size: 10px;
    color: var(--ink-muted);
    font-family: "IBM Plex Mono", monospace;
    white-space: nowrap;
    line-height: 1.35;
    opacity: 0.9;
}

.event-row-summary {
    font-size: 10px;
    color: color-mix(in srgb, var(--ink-muted) 92%, var(--ink-2));
    margin-top: 4px;
    line-height: 1.4;
    word-break: break-word;
}

.event-group-request {
    color: #5a86c8;
    background: color-mix(in srgb, #5a86c8 8%, var(--bg-elev-2));
}

.event-group-chat {
    color: #6b92bf;
    background: color-mix(in srgb, #6b92bf 8%, var(--bg-elev-2));
}

.event-group-run {
    color: #4476ad;
    background: color-mix(in srgb, #4476ad 8%, var(--bg-elev-2));
}

.event-group-awaiting {
    color: #d2b395;
    background: color-mix(in srgb, #d2b395 8%, var(--bg-elev-2));
}

.event-group-content {
    color: #5aa79d;
    background: color-mix(in srgb, #5aa79d 8%, var(--bg-elev-2));
}

.event-group-reasoning {
    color: #7ab9a8;
    background: color-mix(in srgb, #7ab9a8 7%, var(--bg-elev-2));
}

.event-group-tool {
    color: #d6a05e;
    background: color-mix(in srgb, #d6a05e 7%, var(--bg-elev-2));
}

.event-group-action {
    color: #ca9168;
    background: color-mix(in srgb, #ca9168 8%, var(--bg-elev-2));
}

.event-group-plan {
    color: #8e82c4;
    background: color-mix(in srgb, #8e82c4 8%, var(--bg-elev-2));
}

.event-group-task {
    color: #a094d0;
    background: color-mix(in srgb, #a094d0 8%, var(--bg-elev-2));
}

.event-group-artifact {
    color: #d98a42;
    background: color-mix(in srgb, #d98a42 8%, var(--bg-elev-2));
}

.event-group-unrecognized {
    color: color-mix(in srgb, var(--ink-muted) 88%, var(--ink-2));
    background: color-mix(in srgb, var(--ink-muted) 5%, var(--bg-elev-2));
}

.event-row.is-error-type {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-danger) 38%, transparent);
}

/* Event Popover */
.event-popover {
    position: fixed;
    z-index: 60;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    background: var(--bg-elev-2);
    box-shadow: var(--shadow-strong);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.event-popover-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line-soft);
}

.event-popover-head-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.event-popover-head strong {
    font-size: 12px;
}

.event-popover-meta {
    font-size: 11px;
    color: var(--ink-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-popover-head button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--ink-muted);
    padding: 2px 6px;
    border-radius: 6px;
}

.event-popover-head button:hover {
    color: var(--ink-1);
    background: var(--bg-hover);
    box-shadow: none;
}

.event-popover-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.event-popover-action-btn.ui-btn.ui-btn-sm.is-icon-only {
    width: 28px;
    min-width: 28px;
    min-height: 28px;
}

.event-popover-copy-menu-overlay .ant-popover-inner {
    padding: 0;
}

.event-popover-copy-menu-overlay .ant-popover-inner-content {
    padding: 6px;
}

.event-popover-copy-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 168px;
}

.event-popover-copy-menu-item {
    width: 100%;
    justify-content: flex-start;
    white-space: nowrap;
    font-size: 11px;
}

.event-popover-body {
    flex: 1;
    overflow: auto;
    max-height: 50vh;
    padding: 10px 12px;
    margin: 0;
    font:
        400 10px/1.48 "IBM Plex Mono",
        monospace;
    color: var(--ink-2);
    white-space: pre-wrap;
    word-break: break-all;
}

.event-popover-prompt-modal {
    z-index: 80;
}

.modal-card.event-popover-prompt-card {
    width: min(84vw, 1480px);
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 36px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.event-popover-prompt-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px 10px;
    border-bottom: 1px solid var(--line-soft);
}

.event-popover-prompt-head h3 {
    margin: 0;
    font-size: 15px;
}

.event-popover-prompt-head p {
    margin: 4px 0 0;
    font-size: 11px;
    color: var(--ink-muted);
}

.event-popover-prompt-body {
    overflow: auto;
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-popover-prompt-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.event-popover-prompt-section strong {
    font-size: 11px;
}

.event-popover-prompt-summary,
.event-popover-prompt-entries {
    display: grid;
    gap: 10px;
}

.event-popover-prompt-summary {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
}

.event-popover-prompt-chip {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--bg-elev-2) 88%, var(--bg-input));
    padding: 7px 10px;
    color: var(--ink-2);
    font-size: 11px;
    font-weight: 700;
}

.event-popover-prompt-entry {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--bg-elev-2) 88%, var(--bg-input));
    padding: 12px;
}

.event-popover-prompt-entry summary,
.event-popover-prompt-raw summary {
    cursor: pointer;
    font-weight: 800;
}

.event-popover-prompt-entry summary {
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-popover-prompt-entry-heading {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.event-popover-prompt-entry-title {
    font-size: 12px;
    color: var(--ink-1);
    line-height: 1.35;
    word-break: break-word;
    font-weight: 800;
}

.event-popover-prompt-entry-tags {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.event-popover-prompt-tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid transparent;
}

.event-popover-prompt-tag-round {
    color: #3f6fb0;
    background: color-mix(in srgb, #5a86c8 13%, var(--bg-elev-2));
    border-color: color-mix(in srgb, #5a86c8 24%, var(--line-soft));
}

.event-popover-prompt-tag-role {
    color: var(--ink-2);
    background: color-mix(in srgb, var(--bg-elev-1) 82%, var(--bg-input));
    border-color: var(--line-soft);
}

.event-popover-prompt-tag-role-user {
    color: #356c56;
    background: color-mix(in srgb, #5aa79d 14%, var(--bg-elev-2));
    border-color: color-mix(in srgb, #5aa79d 24%, var(--line-soft));
}

.event-popover-prompt-tag-role-assistant {
    color: #7d5f1c;
    background: color-mix(in srgb, #d6a05e 16%, var(--bg-elev-2));
    border-color: color-mix(in srgb, #d6a05e 26%, var(--line-soft));
}

.event-popover-prompt-tag-role-tool {
    color: #7d4a2f;
    background: color-mix(in srgb, #ca9168 16%, var(--bg-elev-2));
    border-color: color-mix(in srgb, #ca9168 28%, var(--line-soft));
}

.event-popover-prompt-tag-role-system {
    color: #5f5295;
    background: color-mix(in srgb, #8e82c4 16%, var(--bg-elev-2));
    border-color: color-mix(in srgb, #8e82c4 28%, var(--line-soft));
}

.event-popover-prompt-tag-token {
    color: #7d5f1c;
    background: color-mix(in srgb, #e2c66c 18%, var(--bg-elev-2));
    border-color: color-mix(in srgb, #e2c66c 30%, var(--line-soft));
}

.event-popover-prompt-section pre {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    background: var(--bg-elev-1);
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font:
        400 11px/1.5 "IBM Plex Mono",
        monospace;
}

.event-popover-prompt-entry > pre,
.event-popover-prompt-raw > pre {
    margin-top: 12px;
}

.event-popover-prompt-raw {
    margin-top: 10px;
}

/* Debug event cards for tools tab */
.debug-event-card {
    border: 1px solid color-mix(in srgb, var(--line-soft) 94%, transparent);
    border-radius: 10px;
    background: var(--bg-elev-2);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
}

.debug-event-card+.debug-event-card {
    margin-top: 6px;
}

.debug-event-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.debug-event-head strong {
    color: var(--accent-electric-strong);
    font-size: 12px;
    font-family: "IBM Plex Mono", monospace;
}

.debug-event-meta {
    font-size: 11px;
    color: var(--ink-2);
    line-height: 1.35;
    word-break: break-word;
}

.debug-event-json {
    margin: 0;
    border: 1px solid color-mix(in srgb, var(--line-soft) 88%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bg-input) 84%, var(--bg-elev-2));
    color: var(--ink-2);
    font-size: 11px;
    font-family: "IBM Plex Mono", monospace;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-all;
    padding: 8px;
}

/* ========================================
   Settings Modal
   ======================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(6px);
}

.modal-card {
    width: min(440px, calc(100vw - 32px));
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: var(--bg-base);
    padding: 22px;
    box-shadow: var(--shadow-strong);
}

.settings-card {
    width: min(920px, calc(100vw - 32px));
    max-height: min(82vh, 860px);
    overflow: auto;
}

.command-modal-card {
    width: min(780px, calc(100vw - 32px));
    max-height: min(76vh, 720px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.command-modal-card.is-automation-console {
    width: min(1120px, calc(100vw - 32px));
    max-height: min(84vh, 900px);
}

.command-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.command-modal-head h3 {
    margin: 0;
    font-size: 18px;
}

.command-modal-subtitle {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--ink-muted);
}

.command-modal-section {
    min-height: 0;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.history-list-container .ant-divider {
    margin: 6px 0;
    border-color: var(--border);
}

.history-list-action-time {
    color: var(--text-muted);
    font-size: 12px;
}

.history-list-actions button {
    display: none;
}

.history-list-actions button:first-of-type {
    display: flex;
}

.command-list-item:hover .chat-actions-trigger {
    opacity: 1;
}

.command-list-item:hover .history-list-action-time {
    display: none;
}

.command-list-item:hover .history-list-actions button {
    display: flex;
}

.command-modal-list {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: auto;
    padding-right: 4px;
    max-height: 70vh;
    gap: 2px;
}

.command-modal-list-focusable:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-soft) 42%, transparent);
    border-radius: 12px;
}

.command-history-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.command-history-toolbar .ui-input {
    flex: 1;
    min-width: 0;
}

.command-history-toolbar .ant-input-affix-wrapper {
    flex: 1 1 auto;
    min-width: 0;
}

.left-sidebar-rename-agent-input.ant-input {
    border: 1px solid var(--line-soft) !important;
    box-shadow: none;
}

.left-sidebar-rename-agent-input.ant-input:focus {
    border-color: var(--accent-electric) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-electric) 14%, transparent);
}

.command-history-toolbar-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.command-history-action {
    flex: 0 0 auto;
    white-space: nowrap;
    color: var(--accent-electric) !important;
}

.command-list-item {
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 12px;
    text-align: left;
    position: relative;
}

.command-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: relative;
}

.command-list-head .chat-actions-trigger {
    flex: 0 0 auto;
    color: var(--ink-muted);
}

.command-list-head strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.3;
    min-width: 0;
}

.command-list-head span {
    font-size: 11px;
    line-height: 1.3;
    color: var(--ink-muted);
    flex: 0 0 auto;
}

.command-list-meta {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 11px;
    color: var(--ink-muted);
}

.command-list-preview {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.command-empty-state {
    border: 1px dashed color-mix(in srgb, var(--line-strong) 76%, transparent);
    border-radius: 14px;
    padding: 24px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--ink-muted);
    background: color-mix(in srgb, var(--bg-input) 56%, var(--bg-elev-2));
}

.archive-modal .ant-modal-body {
    padding-top: 8px;
}

.archive-modal-layout {
    min-height: 520px;
    max-height: min(72vh, 720px);
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: 16px;
}

.archive-modal-list-pane,
.archive-detail-pane {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.archive-toolbar .ant-input-prefix {
    color: var(--ink-muted);
    margin-right: 6px;
}

.archive-bulk-panel {
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg-input) 68%, var(--bg-elev-2));
    padding: 10px;
}

.archive-bulk-label,
.archive-bulk-result {
    font-size: 12px;
    color: var(--ink-muted);
}

.archive-bulk-result {
    margin-top: 8px;
}

.archive-list {
    min-height: 0;
    max-height: 430px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 4px;
}

.archive-list-item {
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink-1);
    padding: 11px 12px;
    text-align: left;
}

.archive-list-item:hover,
.archive-list-item.is-active {
    background: var(--bg-base);
}

.archive-list-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.archive-list-item-head strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.archive-list-item-head span {
    flex: 0 0 auto;
    font-size: 11px;
    color: var(--ink-muted);
}

.archive-list-preview {
    display: block;
    margin-top: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: var(--text-muted);
}

.archive-list-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.archive-detail-pane {
    border-left: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    padding-left: 16px;
}

.archive-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.archive-detail-head h3 {
    margin: 0;
    font-size: 16px;
}

.archive-detail-head p {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--ink-muted);
}

.archive-detail-content {
    min-height: 0;
    max-height: 520px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}

.archive-preview-line {
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg-input) 62%, var(--bg-elev-2));
    padding: 10px 12px;
}

.archive-preview-label {
    margin-bottom: 6px;
    font: 600 11px/1.2 "IBM Plex Mono", monospace;
    color: var(--ink-muted);
}

.archive-preview-text {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 13px;
    line-height: 1.55;
    color: var(--ink-1);
}

.command-switch-toolbar {
    display: grid;
    gap: 12px;
}

.command-scope-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.command-scope-btn {
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-muted);
    background: color-mix(in srgb, var(--bg-input) 72%, var(--bg-elev-2));
    box-shadow: none;
}

.command-scope-btn.is-active {
    border-color: color-mix(in srgb,
            var(--accent-electric) 52%,
            var(--line-soft));
    color: var(--accent-electric-strong);
    background: color-mix(in srgb, var(--accent-soft) 84%, var(--bg-elev-2));
}

.command-switch-compact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    width: 100%;
}

.command-switch-worker-icon {
    flex: 0 0 auto;
}

.command-switch-compact-main {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    gap: 4px;
}

.command-switch-compact .command-list-head {
    justify-content: flex-start;
}

.command-switch-compact .command-list-head strong,
.history-list-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.command-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    overflow: auto;
    padding-right: 4px;
}

.command-detail-card,
.command-detail-block {
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-input) 68%, var(--bg-elev-2));
    padding: 14px;
}

.command-detail-label {
    display: block;
    font-size: 11px;
    color: var(--ink-muted);
    margin-bottom: 6px;
}

.command-detail-card strong {
    font-size: 14px;
    color: var(--ink-1);
    word-break: break-word;
}

.command-detail-block {
    grid-column: 1 / -1;
}

.command-detail-block h4 {
    margin: 0 0 10px;
    font-size: 13px;
}

.command-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.command-empty-inline {
    font-size: 12px;
    color: var(--ink-muted);
}

.command-raw-block pre {
    margin: 0;
    max-height: 220px;
    overflow: auto;
    font:
        12px/1.55 "IBM Plex Mono",
        monospace;
    color: var(--ink-2);
    white-space: pre-wrap;
    word-break: break-word;
}

.command-automation-form {
    overflow: auto;
    padding-right: 4px;
}

.command-automation-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.automation-console {
    overflow: hidden;
}

.automation-console-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
}

.automation-console-toolbar .ant-input-affix-wrapper {
    grid-column: 1 / -1;
}

.automation-console-toolbar select,
.automation-console-detail select {
    width: 100%;
    min-height: 32px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--bg-input) 92%, var(--bg-elev-2));
    color: var(--ink-1);
    font-size: 12px;
    padding: 6px 8px;
}

.automation-console-toolbar .ant-select,
.automation-console-detail .ant-select {
    min-width: 0;
    width: 100%;
}

.registry-category-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--bg-input) 70%, var(--bg-elev-2));
    padding: 4px;
}

.registry-category-tab {
    min-width: 0;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 8px;
    font-size: 12px;
    line-height: 1.25;
}

.registry-category-tab span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.registry-category-tab strong {
    flex: 0 0 auto;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line-soft) 78%, transparent);
    color: var(--ink-muted);
    font-size: 10px;
    line-height: 1.2;
    padding: 2px 6px;
}

.registry-category-tab:hover,
.registry-category-tab.is-active {
    border-color: color-mix(in srgb, var(--accent-soft) 52%, var(--line-soft));
    background: var(--bg-base);
    color: var(--ink-1);
}

.registry-category-tab.is-active strong {
    background: color-mix(in srgb, var(--accent-electric) 14%, var(--bg-input));
    color: var(--accent-electric-strong);
}

.registry-console-toolbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.automation-console-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid color-mix(in srgb, var(--accent-danger) 42%, var(--line-soft));
    border-radius: var(--radius-md);
    padding: 8px 10px;
    color: var(--accent-danger);
    font-size: 12px;
}

.automation-console-body {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.4fr);
    gap: 16px;
    overflow: hidden;
}

.automation-console-list,
.automation-console-detail {
    min-width: 0;
    min-height: 0;
}

.automation-console-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.automation-console-detail {
    overflow: auto;
}

.automation-console-count {
    font-size: 12px;
    color: var(--ink-muted);
}

.automation-console-list-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    padding-right: 2px;
}

.automation-list-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.automation-list-item {
    width: 100%;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--ink-1);
    padding: 8px 10px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.automation-list-item:hover,
.automation-list-item.is-active {
    border-color: color-mix(in srgb, var(--accent-soft) 58%, var(--line-soft));
    background: var(--bg-hover);
}

.automation-list-item-head {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.automation-list-item-title {
    min-width: 0;
    flex: 1;
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    overflow: hidden;
    white-space: nowrap;
}

.automation-list-item-title strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    line-height: 1.35;
}

.automation-list-item-owner {
    flex: 0 0 auto;
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--ink-muted);
    font-size: 12px;
    line-height: 1.35;
}

.automation-list-item-head .ui-tag {
    flex: 0 0 auto;
}

.automation-list-item-meta {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    color: var(--ink-muted);
    line-height: 1.35;
}

.automation-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.automation-detail-head>div:first-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.automation-detail-head strong {
    font-size: 14px;
}

.automation-detail-head span {
    font-size: 11px;
    color: var(--ink-muted);
    overflow-wrap: anywhere;
}

.automation-detail-actions,
.automation-save-actions,
.automation-executions-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.automation-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.automation-form-grid .field-group {
    margin-bottom: 0;
}

.automation-cron-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px;
    align-items: center;
    gap: 8px;
}

.automation-cron-control select,
.automation-cron-control .ant-select {
    min-width: 0;
}

.automation-enabled-field {
    display: flex;
    align-items: flex-end;
}

.automation-enabled-field label,
.automation-enabled-field .ant-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    margin: 0;
    letter-spacing: 0;
    text-transform: none;
}

.automation-enabled-field input {
    width: auto;
}

.automation-mono-textarea {
    font-family: "IBM Plex Mono", monospace;
}

.automation-save-actions {
    margin-top: 12px;
}

.automation-request-box {
    margin: 14px 0 0;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    padding: 12px;
}

.automation-request-box .material-symbols-rounded {
    transform: scale(.8);
}

.automation-request-box legend {
    padding: 0 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-muted);
}

.automation-request-box .field-group:last-child {
    margin-bottom: 0;
}

.registry-console-message {
    border: 1px solid color-mix(in srgb, var(--accent-electric) 28%, var(--line-soft));
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--accent-electric) 7%, transparent);
    color: var(--ink-1);
    font-size: 12px;
    padding: 8px 10px;
}

.registry-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
    font-size: 11px;
    color: var(--ink-muted);
}

.registry-meta-grid span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.registry-diagnostics {
    border-color: color-mix(in srgb, var(--accent-danger) 28%, var(--line-soft));
    background: color-mix(in srgb, var(--accent-danger) 5%, transparent);
}

.registry-diagnostic-row {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 12px;
}

.registry-diagnostic-row + .registry-diagnostic-row {
    border-top: 1px solid color-mix(in srgb, var(--line-soft) 72%, transparent);
}

.registry-diagnostic-row strong {
    color: var(--accent-danger);
    font-size: 11px;
}

.registry-diagnostic-row span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--ink-2);
}

.registry-summary div {
    min-height: 18px;
    font-size: 12px;
    color: var(--ink-2);
    overflow-wrap: anywhere;
}

.registry-editor-field {
    margin-top: 14px;
}

.registry-yaml-editor.ant-input {
    min-height: 420px;
    resize: vertical;
    line-height: 1.5;
    tab-size: 2;
}

.registry-dirty {
    color: var(--ink-muted);
    font-size: 12px;
}

.automation-executions {
    margin-top: 18px;
    border-top: 1px solid var(--line-soft);
    padding-top: 12px;
}

.automation-executions-head {
    justify-content: space-between;
    margin-bottom: 8px;
}

.automation-execution-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.automation-execution-row {
    display: grid;
    grid-template-columns: 82px 1.1fr 70px minmax(120px, 1fr);
    gap: 8px;
    align-items: center;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--bg-input) 55%, transparent);
    padding: 7px 8px;
    font-size: 11px;
    color: var(--ink-muted);
}

.automation-execution-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-console {
    overflow: hidden;
}

.agent-console-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
}

.agent-console-detail select {
    width: 100%;
    min-height: 32px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--bg-input) 92%, var(--bg-elev-2));
    color: var(--ink-1);
    font-size: 12px;
    padding: 6px 8px;
}

.agent-console-detail .ant-select {
    min-width: 0;
    width: 100%;
}

.agent-console-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid color-mix(in srgb, var(--accent-danger) 42%, var(--line-soft));
    border-radius: var(--radius-md);
    padding: 8px 10px;
    color: var(--accent-danger);
    font-size: 12px;
}

.agent-console-body {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(280px, 0.52fr) minmax(480px, 1.55fr);
    gap: 16px;
    overflow: hidden;
}

.agent-console-list,
.agent-console-detail {
    min-width: 0;
    min-height: 0;
}

.agent-console-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.agent-console-detail {
    overflow: auto;
}

.agent-console-count {
    font-size: 12px;
    color: var(--ink-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.agent-console-list-scroll {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto;
    padding-right: 2px;
}

.agent-console-list-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.agent-console-list-item {
    width: 100%;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--ink-1);
    padding: 8px 10px;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.agent-console-list-item:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent-electric) 68%, transparent);
    outline-offset: 2px;
}

.agent-console-list-item-icon.is-drag-handle {
    cursor: grab;
}

.agent-console-list-item-icon.is-drag-handle:active {
    cursor: grabbing;
}

.agent-console-list-item.is-dragging {
    opacity: 0.55;
}

.agent-console-list-item:hover,
.agent-console-list-item.is-active {
    border-color: color-mix(in srgb, var(--accent-soft) 58%, var(--line-soft));
    background: var(--bg-hover);
}

.agent-console-list-item.is-invalid {
    border-color: color-mix(in srgb, var(--accent-danger) 34%, transparent);
    background: color-mix(in srgb, var(--accent-danger) 7%, transparent);
}

.agent-console-list-item-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--accent-soft) 22%, var(--bg-input));
    color: var(--accent-electric);
    overflow: hidden;
}

.agent-console-list-item-svg {
    display: block;
}

.agent-console-list-item-main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.agent-console-list-item-row {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.agent-console-list-item-row span,
.agent-console-list-item-head strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-console-list-item-head {
    color: var(--ink-1);
}

.agent-console-list-item-head strong {
    font-size: 13px;
}

.agent-console-list-item-head span {
    flex: 0 1 auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
}

.agent-console-list-item-head-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
}

.agent-console-status {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
}

.agent-console-status.is-invalid {
    background: color-mix(in srgb, var(--accent-danger) 14%, var(--bg-input));
    color: var(--accent-danger);
}

.agent-console-list-item-meta {
    font-size: 11px;
    color: var(--ink-muted);
}

.agent-console-list-item-meta span {
    font-size: 11px;
    font-weight: 500;
    color: var(--ink-muted);
}

.agent-console-list-item-diagnostic {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--accent-danger);
    font-size: 11px;
    font-weight: 500;
}

.agent-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.agent-detail-head>div:first-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.agent-detail-head strong {
    font-size: 14px;
}

.agent-detail-head span {
    font-size: 11px;
    color: var(--ink-muted);
    overflow-wrap: anywhere;
}

.agent-detail-actions,
.agent-save-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.agent-detail-admin-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 14px;
}

.agent-diagnostics,
.agent-console-uneditable {
    border: 1px solid color-mix(in srgb, var(--accent-danger) 26%, var(--line-soft));
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--accent-danger) 6%, transparent);
    color: var(--ink-1);
    font-size: 12px;
}

.agent-diagnostics strong {
    color: var(--accent-danger);
    font-weight: 700;
}

.agent-diagnostics {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 9px 10px;
}

.agent-diagnostic-item {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.agent-diagnostic-code {
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 700;
}

.agent-console-uneditable {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: var(--accent-danger);
}

.agent-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.agent-form-grid .field-group {
    margin-bottom: 0;
}

.agent-config-box {
    margin: 14px 0 0;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    padding: 12px;
}

.agent-config-box legend {
    padding: 0 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-muted);
}

.agent-config-box .field-group:last-child {
    margin-bottom: 0;
}

.agent-icon-editor,
.agent-wonder-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.agent-icon-preview {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.agent-wonders-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agent-wonder-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.agent-mono-textarea {
    font-family: "IBM Plex Mono", monospace;
}

.agent-prompt-textarea {
    min-height: 120px;
}

.agent-save-actions {
    margin-top: 12px;
}

@media (max-width: 860px) {
    .automation-console-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .registry-console-toolbar {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .registry-category-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .automation-console-toolbar .ant-input-affix-wrapper {
        grid-column: 1 / -1;
    }

    .automation-console-body {
        grid-template-columns: 1fr;
        overflow: auto;
    }

    .automation-console-list {
        max-height: 260px;
    }

    .automation-form-grid {
        grid-template-columns: 1fr;
    }

    .automation-execution-row {
        grid-template-columns: 1fr;
    }

    .registry-meta-grid {
        grid-template-columns: 1fr;
    }

    .registry-yaml-editor.ant-input {
        min-height: 320px;
    }

    .agent-console-toolbar {
        grid-template-columns: 1fr auto auto;
    }

    .agent-console-toolbar .ant-input-affix-wrapper {
        grid-column: 1 / -1;
    }

    .agent-console-body {
        grid-template-columns: 1fr;
        overflow: auto;
    }

    .agent-console-list {
        max-height: 260px;
    }

    .agent-form-grid {
        grid-template-columns: 1fr;
    }
}

.settings-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.settings-head h3 {
    margin: 0;
    font-size: 16px;
}

.settings-head button {
    border: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
    padding: 4px 10px;
    border-radius: 8px;
}

.settings-head button:hover {
    color: var(--ink-1);
    background: var(--bg-hover);
    box-shadow: none;
}

.field-group {
    margin-bottom: 16px;
}

.settings-preferences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.settings-preferences-grid .field-group {
    margin-bottom: 0;
}

.field-group label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--ink-muted);
    margin-bottom: 4px;
}

.field-group input {
    width: 100%;
    padding: 8px 10px;
    font-size: 12px;
}

.field-group textarea,
.settings-textarea {
    width: 100%;
    padding: 8px 10px;
    font-size: 12px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--bg-input) 92%, var(--bg-elev-2));
    color: var(--ink-1);
    resize: vertical;
}

.settings-readonly-textarea {
    min-height: 72px;
    background: color-mix(in srgb, var(--bg-input) 86%, var(--bg-elev-2));
}

.field-group.is-error input,
.field-group input.is-error {
    border-color: var(--accent-danger);
}

.settings-error {
    margin: 4px 0 0;
    font-size: 11px;
    color: var(--accent-danger);
}

.settings-hint {
    margin: 6px 0 0;
    font-size: 10px;
    color: var(--ink-muted);
}

.settings-inline-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.settings-inline-actions button {
    flex: 1;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 600;
}

.settings-segmented {
    display: inline-flex;
    align-items: center;
    justify-content: stretch;
    gap: 8px;
    width: 100%;
    padding: 4px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-input) 74%, var(--bg-elev-2));
    box-shadow: inset 0 1px 0 color-mix(in srgb, white 36%, transparent);
}

.settings-segmented-btn.ui-btn {
    flex: 1 1 0;
    min-width: 96px;
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--ink-muted);
    background: transparent;
    box-shadow: none;
}

.settings-segmented-btn.ui-btn:hover:not(:disabled) {
    color: var(--ink-2);
    background: color-mix(in srgb, var(--bg-elev-2) 82%, transparent);
    box-shadow: none;
}

.settings-segmented-btn.ui-btn.is-active {
    color: var(--accent-electric-strong);
    background: color-mix(in srgb, var(--accent-soft) 88%, var(--bg-elev-2));
    box-shadow: 0 8px 20px color-mix(in srgb, var(--accent-soft) 24%, transparent);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.settings-grid button {
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 600;
}

.settings-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    font-size: 12px !important;
    letter-spacing: 0 !important;
    color: var(--ink-2) !important;
    margin-bottom: 10px !important;
}

.settings-toggle input {
    width: auto !important;
    margin: 0;
}

.settings-numeric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.memory-info-card {
    width: min(1220px, calc(100vw - 36px));
    height: min(88vh, 940px);
    min-height: min(88vh, 940px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.memory-info-page {
    min-height: 100vh;
    display: grid;
    place-items: stretch center;
}

.memory-info-page-card {
    width: 100%;
    height: 100%;
    min-height: 620px;
    padding: 10px;
}

.memory-info-head {
    margin-bottom: 0;
}

.memory-info-subtitle {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-muted);
}

.memory-console-tabs {
    width: min(640px, 100%);
    min-width: 0;
}

.memory-info-card .settings-segmented {
    width: 100%;
    max-width: 640px;
}

.memory-info-card .settings-segmented-btn.ui-btn {
    min-width: 0;
    font-size: 13px;
}

.memory-console-pane {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.memory-info-layout {
    min-height: 0;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
    gap: 18px;
}

.memory-info-pane {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 90%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--bg-elev-2) 94%, var(--bg-input));
    box-shadow: var(--shadow-soft);
    padding: 16px;
}

.memory-info-pane-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--line-soft) 88%, transparent);
}

.memory-info-pane-header strong {
    display: block;
    font-size: 15px;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--ink-1);
}

.memory-info-pane-hint {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--ink-muted);
}

.memory-info-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.memory-info-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.memory-info-pane-list .memory-info-filter-grid {
    gap: 10px 12px;
}

.memory-info-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.memory-info-pane-list .memory-info-field {
    gap: 5px;
}

.memory-info-field span {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--ink-muted);
}

.memory-info-pane-list .memory-info-field span {
    font-size: 11px;
}

.memory-info-field-wide {
    grid-column: 1 / -1;
}

.memory-info-input,
.memory-info-select {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    font-size: 13px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-input) 92%, var(--bg-elev-2));
    color: var(--ink-1);
}

.memory-info-pane-list .memory-info-input,
.memory-info-pane-list .memory-info-select {
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 12px;
}

.memory-info-pane-list .memory-info-select {
    padding-right: 34px;
    background-position: right 10px center;
    background-size: 14px 14px;
}

.memory-info-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2716%27 height=%2716%27 viewBox=%270 0 16 16%27 fill=%27none%27%3E%3Cpath d=%27M4 6L8 10L12 6%27 stroke=%27%235C667A%27 stroke-width=%271.8%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px 16px;
}

.memory-info-input:focus,
.memory-info-select:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--accent-electric) 48%, var(--line-soft));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-soft) 32%, transparent);
}

.memory-info-error {
    border: 1px solid color-mix(in srgb, var(--accent-danger) 32%, var(--line-soft));
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 12px;
    color: var(--accent-danger);
    background: color-mix(in srgb, var(--accent-danger) 8%, var(--bg-elev-2));
}

.memory-info-banner {
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 12px;
}

.memory-info-banner-warning {
    color: color-mix(in srgb, #9a6700 72%, var(--ink-1));
    border-color: color-mix(in srgb, #f5c451 45%, var(--line-soft));
    background: color-mix(in srgb, #fff6d8 72%, var(--bg-elev-2));
}

.memory-info-banner-success {
    color: color-mix(in srgb, #156f48 72%, var(--ink-1));
    border-color: color-mix(in srgb, #82d4ab 40%, var(--line-soft));
    background: color-mix(in srgb, #ecfff3 74%, var(--bg-elev-2));
}

.memory-info-banner-danger {
    color: var(--accent-danger);
    border-color: color-mix(in srgb, var(--accent-danger) 32%, var(--line-soft));
    background: color-mix(in srgb, var(--accent-danger) 8%, var(--bg-elev-2));
}

.memory-info-record-list {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: auto;
    padding: 4px 6px 12px 0;
    scrollbar-gutter: stable;
}

.memory-info-record-item {
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-elev-2) 94%, var(--bg-input));
    padding: 11px 12px;
    text-align: left;
    transition:
        border-color 140ms ease,
        background 140ms ease,
        box-shadow 140ms ease,
        transform 140ms ease;
}

.memory-info-record-item:hover,
.memory-info-record-item.is-selected {
    border-color: color-mix(in srgb, var(--accent-electric) 52%, var(--line-soft));
    background: color-mix(in srgb, var(--accent-soft) 58%, var(--bg-elev-2));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-soft) 82%, transparent);
}

.memory-info-record-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.memory-info-record-head strong {
    font-size: 13px;
    line-height: 1.45;
    letter-spacing: -0.01em;
    color: var(--ink-1);
    word-break: break-word;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.memory-info-record-head span {
    flex: 0 0 auto;
    font-size: 11px;
    white-space: nowrap;
    color: var(--ink-muted);
}

.memory-info-record-meta,
.memory-info-record-tags,
.memory-info-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.memory-info-record-meta,
.memory-info-record-tags {
    margin-top: 6px;
}

.memory-info-record-item .ui-tag {
    min-height: 20px;
    padding: 2px 7px;
    font-size: 11px;
}

.memory-info-record-summary,
.memory-info-detail-summary,
.memory-info-detail-content {
    font-size: 13px;
    line-height: 1.7;
    color: var(--ink-2);
    white-space: pre-wrap;
    word-break: break-word;
}

.memory-info-record-summary {
    margin-top: 10px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.memory-info-detail-stack {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: auto;
    padding: 0 8px 18px 0;
    scrollbar-gutter: stable;
}

.memory-info-detail-title h4 {
    margin: 0;
    font-size: 17px;
    line-height: 1.45;
    letter-spacing: -0.01em;
    color: var(--ink-1);
}

.memory-info-detail-badges {
    margin-top: 10px;
}

.memory-info-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.memory-info-detail-card,
.memory-info-detail-block {
    box-sizing: border-box;
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-input) 74%, var(--bg-elev-2));
    padding: 14px 15px;
}

.memory-info-detail-card strong {
    display: block;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-1);
    word-break: break-word;
}

.memory-info-detail-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.memory-info-raw-block {
    overflow: hidden;
    margin-bottom: 2px;
}

.memory-info-raw-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    list-style: none;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-1);
}

.memory-info-raw-summary::-webkit-details-marker {
    display: none;
}

.memory-info-raw-block pre {
    margin: 0;
    max-height: 260px;
    overflow: auto;
    font:
        12px/1.55 "IBM Plex Mono",
        monospace;
    color: var(--ink-2);
    white-space: pre-wrap;
    word-break: break-word;
}

.memory-preview-layout {
    min-height: 0;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    gap: 18px;
}

.memory-preview-pane {
    min-width: 0;
}

.memory-preview-pane-input {
    overflow: auto;
}

.memory-preview-pane-result {
    overflow: hidden;
}

.memory-preview-context-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.memory-preview-context-item {
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-input) 72%, var(--bg-elev-2));
    padding: 12px 13px;
}

.memory-preview-context-item span,
.memory-preview-summary-grid .memory-info-detail-card small {
    display: block;
    font-size: 11px;
    line-height: 1.45;
    color: var(--ink-muted);
}

.memory-preview-context-item strong {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ink-1);
    word-break: break-word;
}

.memory-preview-textarea {
    min-height: 124px;
}

.memory-preview-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.memory-preview-summary-grid .memory-info-detail-card {
    gap: 8px;
}

.memory-preview-layer-tabs {
    width: min(420px, 100%);
}

.memory-preview-prompt-block {
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-input) 72%, var(--bg-elev-2));
    padding: 14px 15px;
}

.memory-preview-prompt-block pre {
    margin: 10px 0 0;
    max-height: 260px;
    overflow: auto;
    font:
        12px/1.65 "IBM Plex Mono",
        monospace;
    color: var(--ink-2);
    white-space: pre-wrap;
    word-break: break-word;
}

.memory-preview-layer-list,
.memory-preview-item-list,
.memory-preview-decision-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.memory-preview-layer-block,
.memory-preview-item,
.memory-preview-decision-item {
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-input) 72%, var(--bg-elev-2));
    padding: 12px 13px;
}

.memory-preview-layer-head,
.memory-preview-item-head,
.memory-preview-decision-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.memory-preview-layer-head span,
.memory-preview-item-head span {
    font-size: 11px;
    line-height: 1.45;
    color: var(--ink-muted);
}

.memory-preview-item-head strong,
.memory-preview-decision-head strong {
    font-size: 13px;
    line-height: 1.45;
    color: var(--ink-1);
}

.memory-preview-layer-empty {
    font-size: 12px;
    line-height: 1.55;
    color: var(--ink-muted);
}

.memory-preference-scope-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.memory-preference-scope-tab.ui-btn {
    border-radius: 14px;
    padding-inline: 16px;
}

.memory-preference-layout {
    min-height: 0;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(290px, 340px) minmax(320px, 0.92fr) minmax(360px, 1.08fr);
    gap: 18px;
}

.memory-preference-pane {
    min-width: 0;
}

.memory-preference-pane-editor,
.memory-preference-pane-detail {
    overflow: auto;
}

.memory-preference-pane-list {
    overflow: hidden;
}

.memory-preference-mode-toggle {
    width: fit-content;
    min-width: 292px;
}

.memory-preference-form,
.memory-preference-markdown-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.memory-preference-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.memory-preference-textarea {
    min-height: 112px;
}

.memory-preference-markdown {
    min-height: 360px;
    font:
        12px/1.6 "IBM Plex Mono",
        monospace;
}

.memory-preference-markdown-hint {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 90%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-elev-2) 92%, var(--accent-soft));
    padding: 10px 12px;
}

.memory-preference-markdown-hint p {
    margin: 0;
    color: var(--ink-2);
    font-size: 12px;
    line-height: 1.6;
}

.memory-preference-validation {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.memory-preference-validation-item {
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.5;
}

.memory-preference-validation-item.is-error {
    color: var(--accent-danger);
    background: color-mix(in srgb, var(--accent-danger) 8%, var(--bg-elev-2));
}

.memory-preference-validation-item.is-warning {
    color: color-mix(in srgb, #9a6700 72%, var(--ink-1));
    background: color-mix(in srgb, #fff6d8 72%, var(--bg-elev-2));
}

.memory-preference-record-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-elev-2) 88%, var(--bg-input));
    padding: 10px 10px 10px 12px;
    transition:
        border-color 140ms ease,
        background 140ms ease,
        box-shadow 140ms ease,
        transform 140ms ease;
}

.memory-preference-record-row.is-selected {
    border-color: color-mix(in srgb, var(--accent-electric) 52%, var(--line-soft));
    background: color-mix(in srgb, var(--accent-soft) 74%, var(--bg-elev-2));
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--accent-soft) 88%, transparent),
        0 8px 18px color-mix(in srgb, var(--accent-soft) 12%, transparent);
    transform: translateY(-1px);
}

.memory-preference-record-main {
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
    min-width: 0;
    display: grid;
    grid-template-columns: 4px minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.memory-preference-record-marker {
    width: 4px;
    min-height: 100%;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-electric) 26%, var(--line-soft));
}

.memory-preference-record-row.is-selected .memory-preference-record-marker {
    background: color-mix(in srgb, var(--accent-electric) 78%, white);
}

.memory-preference-record-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.memory-preference-record-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.memory-preference-record-topline strong {
    min-width: 0;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 700;
    color: var(--ink-1);
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.memory-preference-record-topline span {
    flex: 0 0 auto;
    font-size: 11px;
    line-height: 1.35;
    white-space: nowrap;
    color: var(--ink-muted);
}

.memory-preference-pane-list .memory-info-record-meta {
    margin-top: 0;
    gap: 6px;
}

.memory-preference-pane-list .memory-info-record-summary {
    margin-top: 0;
    font-size: 12px;
    line-height: 1.55;
    color: var(--ink-muted);
    -webkit-line-clamp: 2;
}

.memory-preference-record-delete.ui-btn {
    align-self: flex-start;
    min-width: 0;
    padding: 6px 8px;
    border-radius: 10px;
}

@media (max-width: 1320px) {
    .memory-preference-layout {
        grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    }

    .memory-preference-pane-editor {
        grid-column: 1 / -1;
    }
}

@media (max-width: 980px) {
    .memory-info-layout {
        grid-template-columns: 1fr;
    }

    .memory-console-tabs {
        min-width: 0;
        width: 100%;
    }

    .memory-info-filter-grid,
    .memory-info-detail-grid {
        grid-template-columns: 1fr;
    }

    .memory-preview-layout,
    .memory-preview-context-list,
    .memory-preview-summary-grid,
    .memory-preference-layout,
    .memory-preference-form-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Fireworks Canvas
   ======================================== */
#fireworks-canvas {
    position: fixed;
    inset: 0;
    z-index: 999;
    pointer-events: none;
}

.command-status-overlay {
    position: fixed;
    inset: 0;
    z-index: 950;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    padding: 24px;
}

.command-status-card {
    min-width: min(320px, calc(100vw - 48px));
    max-width: min(420px, calc(100vw - 48px));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 18px 24px;
    border-radius: 22px;
    border: 1px solid color-mix(in srgb, var(--accent-electric) 26%, var(--line-soft));
    background:
        radial-gradient(circle at top,
            color-mix(in srgb, var(--accent-soft) 74%, transparent),
            transparent 62%),
        color-mix(in srgb, var(--bg-elev-2) 92%, rgba(9, 16, 33, 0.14));
    box-shadow: 0 20px 60px rgba(14, 32, 72, 0.22);
    backdrop-filter: blur(16px);
    animation: command-status-in 0.28s ease both;
}

.command-status-card.is-pending {
    border-color: color-mix(in srgb,
            var(--accent-electric) 34%,
            var(--line-soft));
}

.command-status-card.is-success {
    border-color: color-mix(in srgb,
            var(--accent-electric) 28%,
            var(--line-soft));
}

.command-status-card.is-error {
    border-color: color-mix(in srgb,
            var(--accent-danger) 42%,
            var(--line-soft));
    background:
        radial-gradient(circle at top,
            color-mix(in srgb, var(--accent-danger) 22%, transparent),
            transparent 62%),
        color-mix(in srgb, var(--bg-elev-2) 94%, rgba(78, 16, 16, 0.14));
    animation:
        command-status-in 0.22s ease both,
        command-status-error 0.36s ease;
}

.command-status-orb {
    position: relative;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.command-status-orb span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--accent-electric) 48%, transparent);
    animation: command-status-pulse 1.35s ease-in-out infinite;
}

.command-status-orb span:nth-child(2) {
    inset: 4px;
    animation-delay: -0.24s;
}

.command-status-orb span:nth-child(3) {
    inset: 9px;
    background: color-mix(in srgb, var(--accent-electric) 88%, white 12%);
    border-color: transparent;
    animation: command-status-core 1.2s ease-in-out infinite;
}

.command-status-card.is-error .command-status-orb span {
    border-color: color-mix(in srgb, var(--accent-danger) 54%, transparent);
}

.command-status-card.is-error .command-status-orb span:nth-child(3) {
    background: color-mix(in srgb, var(--accent-danger) 88%, white 12%);
}

.command-status-card.is-success .command-status-orb span {
    animation-play-state: paused;
}

.command-status-text {
    font:
        700 18px/1.25 "IBM Plex Sans",
        "Noto Sans SC",
        sans-serif;
    letter-spacing: 0.01em;
    color: var(--ink-1);
    text-align: center;
}

.worker-item {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
}

.worker-item.is-empty {
    border-style: dashed;
}

.worker-item .chat-meta-line:last-child {
    margin-top: 0;
    font-size: 11px;
    line-height: 1.45;
    color: var(--ink-2);
}

.worker-collapsed-icon {
    border: 0;
    width: 100%;
    height: auto;
    padding: 2px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 8px !important;
    color: var(--ink-2);
    background: transparent;
    box-shadow: none;
}

.worker-collapsed-icon:hover {
    background: var(--accent-soft) !important;
}

.worker-collapsed-icon.is-active {
    background: var(--accent-soft);
    color: var(--accent) !important;
}

.worker-collapsed-name {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
}

.worker-collapsed-unread-count {
    margin-top: 2px;
}

.worker-collapse {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.worker-collapse .status-line,
.worker-popover .status-line {
    border: 0;
    border-radius: 0;
    background-color: transparent;
}

.worker-popover .ant-popover-inner {
    overflow: hidden;
    border-radius: 14px;
}

.worker-popover .ant-popover-inner-content {
    padding: 0 !important;
}

.worker-collapse .ant-collapse-item {
    border-radius: 8px !important;
    overflow: hidden;
}

.worker-collapse .ant-collapse-item.ant-collapse-item-active {
    box-shadow: var(--shadow-soft);
    background: var(--bg-card);
}

.worker-collapse .ant-collapse-item:hover:not(.ant-collapse-item-active) {
    background: var(--bg-hover);
}

.worker-collapse .ant-collapse-item-active>.ant-collapse-header {
    align-items: flex-start !important;
    padding: 6px 10px !important;
}

.worker-collapse .ant-collapse-header {
    align-items: flex-start !important;
    padding: 6px 2px !important;
}

.worker-collapse .worker-collapse-history {
    color: var(--text-muted);
}

.worker-collapse .ant-collapse-expand-icon {
    padding-top: 10px;
}

.worker-collapse .ant-collapse-header-text {
    min-width: 0;
    flex: 1;
}

.worker-collapse .ant-collapse-content {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: transparent;
}

.worker-collapse .ant-collapse-content-box {
    padding: 0 !important;
}

.worker-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.worker-panel-header-body {
    flex: 1;
    overflow: hidden;
    color: var(--text-main);
}

.worker-panel-header-body .ant-badge {
    transform: scale(0.8);
}

.worker-panel-header-body .ant-badge .ant-badge-count-sm {
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 10px;
}

.worker-panel-role {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 8px;
}

.worker-panel-icon {
    transition: transform 0.2s ease-in-out;
}

.ant-collapse-item-active .worker-panel-icon {
    transform: scale(0.8);
}

.ant-collapse-item-active .worker-panel-new {
    display: unset;
}

.ant-collapse-item-active .worker-panel-preview {
    height: 0;
}

.ant-collapse-item-active>.ant-collapse-header .ant-badge {
    display: none;
}

.worker-panel-preview {
    font-size: 12px;
    height: 20px;
    transition: height 0.2s ease-in-out;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.worker-panel-new {
    display: none;
    width: 20px !important;
    height: 20px !important;
    color: var(--text-muted);
}

.worker-panel-new .material-symbols-rounded {
    font-size: 16px;
}

.worker-panel-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
}

.worker-panel-time-label {
    font-size: 11px;
    color: var(--text-muted);
}

.worker-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px 8px;
}

.worker-popover-header-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.worker-popover-header-icon {
    transform: scale(0.78);
}

.worker-popover-header-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-1);
}

.worker-popover-new {
    display: inline-flex !important;
    width: 24px !important;
    height: 24px !important;
    color: var(--text-muted);
}

.worker-panel-extra-btn {
    min-width: 0;
}

.worker-history-modal .ant-modal-body {
    padding-top: 8px;
}

.history-modal-title-tag {
    color: var(--accent);
    background: var(--accent-soft);
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: normal;
    font-size: 12px;
}

.worker-related-list {
    margin-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    padding-top: 10px;
}

.worker-row-main {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.team-agent-labels {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    color: var(--ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.worker-role {
    flex: 0 0 auto;
    font-size: 11px;
    color: var(--ink-2);
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
}

.worker-chat-sidebar {
    position: fixed;
    top: calc(var(--top-nav-height) + 16px);
    right: calc(var(--right-sidebar-width) + 16px);
    bottom: 88px;
    width: 280px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 96%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-elev-2) 98%, transparent);
    box-shadow: var(--shadow-medium);
    display: flex;
    flex-direction: column;
    z-index: 26;
}

.worker-chat-sidebar.is-collapsed {
    display: none;
}

.worker-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line-soft);
}

.worker-chat-head h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
}

.worker-chat-collapse-btn {
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
}

.worker-chat-item {
    position: relative;
    padding: 6px 8px;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none !important;
    color: var(--text-muted);
}

.worker-chat-action {
    position: relative;
    flex: 0 0 30px;
    min-height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
}

[data-action] .chat-actions-trigger,
[data-action] .worker-chat-loading {
    position: absolute;
    padding: 0;
    top: 50%;
    transform: translateY(-50%);
    right: 5px;
    transition: none;
    display: none;
}

[data-action] .worker-chat-loading {
    animation: ui-spin 1s linear infinite;
    transform: none;
    top: unset;
    color: var(--text-sub);
}

[data-action="loading"] .worker-chat-loading,
[data-action="awaiting"] .worker-chat-loading {
    display: unset;
}

/* WorkerPanelHeader 中不在 [data-action] 上下文内的转圈图标 */
.worker-chat-loading {
    animation: ui-spin 1s linear infinite;
    font-size: 14px;
    color: var(--text-sub);
    margin-right: 2px;
}

[data-action] .worker-panel-time-label {
    opacity: 0;
    text-align: right;
    white-space: nowrap;
}

[data-action="time"] .worker-panel-time-label {
    opacity: 1;
}

.worker-chat-item .chat-actions-trigger {
    color: var(--text-muted);
}

.worker-chat-item:hover {
    background-color: transparent;
    color: var(--text-main);
}

.worker-chat-item:hover [data-action]:not([data-action="loading"]):not([data-action="awaiting"]) .chat-actions-trigger {
    display: unset;
}

.worker-chat-item:hover .worker-panel-time-label {
    opacity: 0;
}

.worker-chat-divider {
    height: 1px;
    background-color: var(--border);
    margin: 0 20px;
}

.worker-chat-preview-list {
    padding-bottom: 2px;
}

.worker-chat-more {
    padding: 0 9px 9px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    cursor: pointer;
    opacity: 0.72;
}

.worker-chat-more:hover {
    color: var(--text-main);
}

.worker-chat-item+.worker-chat-item {
    margin-top: 0;
}

.worker-chat-item.is-active {
    color: var(--text-main);
    background-color: transparent;
    font-weight: bold;
}

.worker-chat-item-head {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.worker-chat-name {
    font-size: 13px;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.worker-chat-time {
    font-size: 10px;
    color: var(--ink-muted);
    font-family: "IBM Plex Mono", monospace;
}

.worker-chat-time-meta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.awaiting-answer-item {
    gap: 4px;
}

.awaiting-answer-question {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted);
}

.awaiting-answer-value {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-main);
    white-space: pre-wrap;
}

.worker-chat-float-btn {
    position: fixed;
    right: 0;
    top: 86px;
    transform: none;
    z-index: 27;
    min-width: 0 !important;
    min-height: 0 !important;
    border-radius: 10px 0 0 10px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 82%, var(--line-soft));
    border-right: 0;
    background: color-mix(in srgb, var(--bg-elev-2) 94%, var(--bg-input));
    color: var(--ink-2);
    padding: 8px 6px !important;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 0.04em;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    box-shadow: var(--shadow-medium) !important;
}

.worker-chat-float-btn:hover {
    background: color-mix(in srgb, var(--bg-hover) 76%, var(--bg-elev-2));
    color: var(--accent-electric-strong);
    box-shadow: 0 10px 20px rgba(10, 38, 87, 0.18) !important;
}

.layout-desktop-fixed.desktop-debug-disabled .worker-chat-sidebar {
    right: 18px;
}

.layout-desktop-fixed.desktop-debug-disabled .worker-chat-float-btn {
    right: 0;
}

.layout-desktop-fixed.desktop-debug-enabled .worker-chat-float-btn {
    right: var(--right-sidebar-width);
}

.agents-page {
    max-width: none;
    margin: 0;
    height: 100vh;
    padding: 10px;
    background: var(--bg-base);
    color: var(--ink-1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.automations-page {
    max-width: none;
    margin: 0;
    min-height: 100vh;
    padding: 10px;
    background: var(--bg-base);
    color: var(--ink-1);
    overflow: auto;
}

.automations-console-page,
.registries-page {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.automations-console-page>.automation-console,
.registries-page>.registry-console {
    flex: 1 1 auto;
    min-height: 0;
}

.agents-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
}

.agents-page-head h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
}

.agents-page-head p {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--ink-2);
}

.agent-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.agent-list-search {
    position: relative;
    display: block;
}

.agent-list-search .ui-input {
    width: 100%;
    padding-left: 34px;
}

.agent-list-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    font-size: 17px;
    color: var(--ink-muted);
    pointer-events: none;
}

.agent-list-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.agent-list-empty {
    border: 1px dashed color-mix(in srgb, var(--line-soft) 88%, transparent);
    border-radius: 8px;
    padding: 24px 16px;
    text-align: center;
    color: var(--ink-muted);
    background: color-mix(in srgb, var(--bg-input) 76%, var(--bg-elev-2));
}

.agent-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 72%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bg-input) 74%, var(--bg-elev-2));
    cursor: default;
}

.agent-list-item[role="button"] {
    cursor: pointer;
}

.agent-list-item:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent-electric) 64%, transparent);
    outline-offset: 2px;
}

.agent-list-item-icon {
    flex: 0 0 auto;
}

.agent-list-item-main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.agent-list-item-head,
.agent-list-item-meta,
.agent-list-item-wonders {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.agent-list-item-name {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-1);
}

.agent-list-item-meta {
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--ink-2);
}

.agent-list-item-meta span+span::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    margin-right: 8px;
    border-radius: 999px;
    vertical-align: middle;
    background: var(--ink-muted);
}

.agent-list-item-wonders {
    flex-wrap: wrap;
}

.agent-list-compact {
    gap: 8px;
}

.agent-list-compact .agent-list-item {
    gap: 10px;
}

/* ========================================
   Responsive Layout
   ======================================== */
.layout-desktop-fixed .left-sidebar {
    min-width: 0;
    grid-column: 1;
    grid-row: 1 / -1;
}

#settings-btn {
    margin: 0 6px;
    justify-content: space-between;
    gap: 10px;
}

#settings-btn>.ui-btn-label {
    width: 100%;
    justify-content: space-between;
}

.settings-trigger-summary {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.settings-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 22px;
    padding: 0 8px;
    border: 1px solid color-mix(in srgb, var(--line-soft) 84%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-elev-1) 92%, transparent);
    color: var(--ink-muted);
    font:
        600 10px/1 "IBM Plex Mono",
        monospace;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.settings-summary-chip-icon {
    font-size: 14px;
}

.sidebar-settings-popover .ant-popover-inner {
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    width: calc(var(--left-sidebar-width) - 10px);
}

.sidebar-settings-popover .ant-popover-inner-content {
    padding: 0;
}

.sidebar-settings-menu {
    padding: 10px;
    background: var(--bg-elev-2);
}

.sidebar-settings-section+.sidebar-settings-section {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid color-mix(in srgb, var(--line-soft) 78%, transparent);
}

.sidebar-settings-section-title {
    margin: 0 2px 8px;
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-settings-section-body {
    display: grid;
    gap: 6px;
}

.sidebar-settings-item.ui-btn {
    width: 100%;
    padding: 9px 10px;
    justify-content: flex-start;
    text-align: left;
    border-radius: 12px;
}

.sidebar-settings-item.ui-btn:hover:not(:disabled) {
    background: color-mix(in srgb, var(--accent-soft) 82%, var(--bg-elev-2));
    color: var(--ink-1);
}

.sidebar-settings-item.ui-btn.is-active {
    border-color: color-mix(in srgb,
            var(--accent-electric) 36%,
            var(--line-soft));
    background: color-mix(in srgb, var(--accent-soft) 84%, var(--bg-elev-2));
}

.sidebar-settings-item.ui-btn.is-disabled {
    opacity: 0.6;
}

.sidebar-settings-item-content {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 4px;
}

.sidebar-settings-item-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-settings-item-icon {
    font-size: 17px;
}

.sidebar-settings-item-label {
    color: var(--ink-1);
    font-size: 13px;
    font-weight: 600;
}

.sidebar-settings-item-badge {
    margin-left: auto;
    padding: 2px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-soft) 84%, transparent);
    color: var(--accent-electric-strong);
    font-size: 10px;
    font-weight: 700;
}

.sidebar-settings-item-description {
    color: var(--ink-muted);
    font-size: 11px;
    line-height: 1.4;
    white-space: normal;
}

html[data-theme="dark"] .settings-summary-chip {
    background: color-mix(in srgb, var(--bg-elev-1) 88%, transparent);
}

html[data-theme="dark"] .sidebar-settings-popover .ant-popover-inner {
    background: color-mix(in srgb, var(--bg-elev-2) 96%, transparent);
}

html[data-theme="dark"] .sidebar-settings-menu {
    background: var(--bg-base);
}

.layout-desktop-fixed .right-sidebar {
    transform: translateX(0);
    position: relative;
    grid-column: 3;
    grid-row: 1 / -1;
}

.layout-desktop-fixed {
    display: grid;
    grid-template-columns: var(--left-sidebar-close-width) 1fr var(--right-sidebar-width);
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100vh;
    overflow: hidden;
}

.layout-desktop-fixed.terminal-dock-open {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.layout-desktop-fixed.left-drawer-open {
    grid-template-columns: var(--left-sidebar-width) 1fr var(--right-sidebar-width);
}

.layout-desktop-fixed .top-nav {
    grid-column: 2 / 3;
}

.layout-desktop-fixed .bottom-dock {
    grid-column: 2;
    grid-row: 3;
}

.layout-desktop-fixed .terminal-dock {
    grid-column: 2;
    grid-row: 4;
}

.layout-desktop-fixed .conversation-stage {
    grid-column: 2;
    grid-row: 2;
}

.layout-desktop-fixed.left-drawer-open .left-sidebar {
    width: var(--left-sidebar-width);
    min-width: var(--left-sidebar-width);
    pointer-events: auto;
}

.layout-desktop-fixed.desktop-debug-disabled {
    grid-template-columns: var(--left-sidebar-close-width) 1fr 0;
}

.layout-desktop-fixed.desktop-debug-disabled.left-drawer-open {
    grid-template-columns: var(--left-sidebar-width) 1fr 0;
}

.layout-desktop-fixed.desktop-debug-disabled .right-sidebar {
    width: 0;
    min-width: 0;
    border-left: 0;
    transform: translateX(100%);
    pointer-events: none;
}

.layout-desktop-fixed.desktop-debug-enabled {
    grid-template-columns: var(--left-sidebar-close-width) 1fr var(--right-sidebar-width);
}

.layout-desktop-fixed.desktop-debug-enabled.left-drawer-open {
    grid-template-columns: var(--left-sidebar-width) 1fr var(--right-sidebar-width);
}

.layout-agent-route,
.layout-agent-route.left-drawer-open,
.layout-agent-route.desktop-debug-enabled,
.layout-agent-route.desktop-debug-enabled.left-drawer-open {
    grid-template-columns: 0 minmax(0, 1fr) var(--right-sidebar-width);
}

.layout-agent-route.desktop-debug-disabled,
.layout-agent-route.desktop-debug-disabled.left-drawer-open {
    grid-template-columns: 0 minmax(0, 1fr) 0;
}

.layout-agent-route .left-sidebar {
    display: none;
}

.layout-desktop-fixed .drawer-close {
    display: none;
}

@media (max-width: 1279px) {
    .nav-center {
        flex: 1 1 auto;
    }

    .brand-cluster {
        gap: 10px;
    }

    .current-worker-card {
        min-width: 0;
        padding: 7px 12px;
        gap: 8px;
    }

    .current-worker-card.has-one-tool {
        padding-right: 50px;
    }

    .current-worker-name {
        font-size: 14px;
    }

    .top-nav .icon-btn.ui-btn.is-icon-only,
    .top-nav .current-worker-tool.ui-btn {
        width: 34px;
        min-width: 34px;
        min-height: 34px;
    }

    .worker-chat-sidebar {
        top: 66px;
        right: 16px;
        bottom: 92px;
        width: min(300px, calc(100vw - 24px));
    }

    .worker-chat-float-btn {
        right: 0;
        top: 78px;
        bottom: auto;
        padding: 7px 5px !important;
        font-size: 10px;
    }
}

/* ========================================
   Copilot Sidebar Mode
   ======================================== */
.layout-copilot {
    width: min(100vw, 360px);
    max-width: 360px;
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 0;
    padding: 0;
    overflow: hidden;
    background: var(--bg-base);
}

.layout-copilot .copilot-topbar {
    grid-row: 1;
    min-width: 0;
}

.layout-copilot .conversation-stage {
    grid-row: 2;
    min-width: 0;
}

.layout-copilot .bottom-dock {
    grid-row: 3;
    min-width: 0;
}

.copilot-topbar {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: stretch;
    padding: 8px 8px;
    border-bottom: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    background: color-mix(in srgb, var(--bg-card) 96%, var(--bg-base));
    box-shadow: var(--shadow-soft);
}

.copilot-topbar-row {
    min-width: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.copilot-title-block {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.copilot-worker-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.25;
    color: var(--ink-1);
}

.copilot-worker-switch-btn.ui-btn {
    flex: 0 0 auto;
}

.copilot-title-block .status-pill {
    flex: 0 0 auto;
    margin-left: 2px;
    padding: 5px 9px 5px 22px;
    font-size: 10px;
    border-radius: 8px;
}

.copilot-title-block .status-pill::before {
    left: 9px;
    width: 7px;
    height: 7px;
}

.copilot-topbar-actions {
    flex: 0 0 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.copilot-action-btn.ui-btn {
    width: 30px;
    min-width: 30px;
    min-height: 30px;
    border-radius: 8px;
    padding: 0;
    color: var(--ink-2);
    background: color-mix(in srgb, var(--bg-elev-2) 82%, transparent);
}

.copilot-action-btn .material-symbols-rounded {
    font-size: 17px;
}

.layout-copilot .messages-scroll {
    padding: 12px 10px 14px;
}

.layout-copilot .timeline-stack {
    max-width: none;
}

.layout-copilot .timeline-empty {
    max-width: 260px;
    font-size: 17px;
    line-height: 1.35;
}

.layout-copilot .timeline-lane,
.layout-copilot .timeline-run-items {
    gap: 8px;
}

.layout-copilot .timeline-row-user {
    max-width: 92%;
    padding-left: 8px;
}

.layout-copilot .timeline-row-flow {
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 8px;
}

.layout-copilot .timeline-marker,
.layout-copilot .node-icon {
    width: 14px;
}

.layout-copilot .node-icon .material-symbols-rounded {
    font-size: 16px;
}

.layout-copilot .timeline-text {
    font-size: 12px;
    line-height: 1.56;
}

.layout-copilot .timeline-user-bubble {
    padding: 8px 11px;
    border-radius: 12px;
    border-top-right-radius: 7px;
}

.layout-copilot .timeline-run-meta,
.layout-copilot .timeline-task-group {
    margin-left: 20px;
}

.layout-copilot .timeline-task-group-header {
    min-height: 30px;
    gap: 6px;
    padding: 4px 7px;
}

.layout-copilot .timeline-task-group-agent {
    max-width: 86px;
}

.layout-copilot .timeline-task-group-title {
    font-size: 11px;
}

.layout-copilot .timeline-task-group-duration {
    display: none;
}

.layout-copilot .timeline-meta-row,
.layout-copilot .timeline-run-meta {
    gap: 6px;
}

.layout-copilot .timeline-markdown table,
.layout-copilot .timeline-markdown pre {
    font-size: 11px;
}

.layout-copilot .bottom-dock {
    position: relative;
    bottom: auto;
    z-index: 22;
    padding: 6px 8px 10px;
    border-top: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    background: color-mix(in srgb, var(--bg-base) 94%, transparent);
}

.layout-copilot .bottom-dock-inner {
    max-width: none;
}

.layout-copilot .bottom-dock-stack,
.layout-copilot .composer-stack {
    gap: 8px;
}

.layout-copilot .composer-layout {
    gap: 8px;
}

.layout-copilot .composer-pill {
    --composer-main-min-height: 78px;
    border-radius: 10px;
    padding: 5px 5px 5px 10px;
}

.layout-copilot .composer-pill textarea {
    font-size: 12px;
}

.layout-copilot .composer-control-row,
.layout-copilot .composer-actions {
    gap: 5px;
}

.layout-copilot .composer-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.layout-copilot .composer-control-field {
    gap: 6px;
}

.layout-copilot .composer-wonders-header {
    display: none;
}

.layout-copilot .composer-wonders-grid {
    grid-template-columns: 1fr;
    gap: 6px;
}

.layout-copilot .composer-wonder-card {
    border-radius: 8px;
    padding: 9px 10px;
    gap: 5px;
}

.layout-copilot .composer-wonder-text {
    font-size: 12px;
    line-height: 1.45;
}

.layout-copilot .floating-plan .plan-header {
    min-height: 38px;
    border-radius: 10px;
    padding: 7px 9px;
}

.layout-copilot .plan-title {
    font-size: 11px;
}

.layout-copilot .plan-header-badges {
    gap: 4px;
    overflow: hidden;
}

.layout-copilot .floating-plan.is-expanded .plan-list {
    max-height: min(240px, calc(100dvh - 220px));
}

.layout-copilot .artifact-item {
    flex-basis: 180px;
    min-width: 180px;
}

.layout-copilot .frontend-tool-container {
    border-radius: 10px;
}

.layout-copilot .frontend-tool-header {
    padding: 7px 10px;
}

.layout-copilot .frontend-tool-frame {
    height: min(320px, 44vh);
}

.copilot-side-panel {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 45;
    width: min(100vw, 360px);
    max-width: 360px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    background: var(--bg-elev-2);
    box-shadow: var(--shadow-strong);
}

.copilot-side-panel-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
}

.copilot-side-panel-head strong {
    font-size: 14px;
}

.copilot-side-panel-body {
    min-height: 0;
    flex: 1;
    overflow: auto;
}

.copilot-debug-drawer-backdrop {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(100vw, 360px);
    max-width: 360px;
    padding: 0;
    border: 0;
    background: color-mix(in srgb, var(--ink-1) 42%, transparent);
    cursor: default;
    backdrop-filter: blur(6px);
}

.copilot-debug-drawer {
    position: fixed;
    inset: auto auto 0 0;
    z-index: 55;
    width: min(100vw, 360px);
    max-width: 360px;
    height: min(68dvh, 560px);
    min-height: 260px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: var(--bg-elev-2);
    box-shadow: var(--shadow-strong);
}

.copilot-debug-drawer-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--line-soft) 92%, transparent);
}

.copilot-debug-drawer-head strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: var(--ink-1);
}

.copilot-debug-drawer-body {
    min-height: 0;
    flex: 1;
    overflow: auto;
}

.copilot-debug-drawer .debug-panel,
.copilot-debug-drawer .debug-tab {
    height: 100%;
}

.layout-copilot .right-sidebar-overview,
.layout-copilot .attachment-preview-panel,
.layout-copilot .debug-tab {
    height: 100%;
}

.layout-copilot .modal {
    inset: 0 auto 0 0;
    width: min(100vw, 360px);
    max-width: 360px;
    place-items: end stretch;
}

.layout-copilot .modal-card,
.layout-copilot .settings-card,
.layout-copilot .command-modal-card,
.layout-copilot .command-modal-card.is-automation-console,
.layout-copilot .memory-info-card {
    width: 100%;
    max-width: 100%;
    max-height: min(86dvh, 760px);
    border-radius: 14px 14px 0 0;
    padding: 10px 4px;
}

.layout-copilot .command-modal-head {
    gap: 10px;
}

.layout-copilot .command-modal-head h3 {
    font-size: 16px;
}

.layout-copilot .command-detail-grid,
.layout-copilot .automation-console-body,
.layout-copilot .automation-form-grid,
.layout-copilot .settings-preferences-grid,
.layout-copilot .settings-grid,
.layout-copilot .settings-numeric-grid,
.layout-copilot .memory-info-layout,
.layout-copilot .archive-modal-layout {
    grid-template-columns: 1fr;
}

.layout-copilot .command-scope-group,
.layout-copilot .settings-segmented,
.layout-copilot .automation-console-toolbar,
.layout-copilot .automation-detail-actions,
.layout-copilot .automation-save-actions {
    flex-wrap: wrap;
}

.layout-copilot .command-list-head {
    align-items: flex-start;
}

.layout-copilot .command-list-head strong,
.layout-copilot .command-list-preview {
    white-space: normal;
    overflow-wrap: anywhere;
}

.layout-copilot .command-switch-compact .command-list-item {
    padding: 9px 10px;
}

.layout-copilot .command-switch-compact .command-list-head {
    align-items: center;
    gap: 8px;
}

.layout-copilot .command-switch-compact .command-list-head strong {
    white-space: nowrap;
}

.layout-copilot .command-switch-compact .command-list-meta {
    font-size: 12px;
}

.layout-copilot .command-switch-worker-icon {
    width: 28px;
    height: 28px;
}

.layout-copilot .history-list-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.35;
}
.layout-copilot .history-list-action-time {
    font-size: 12px;
}
.layout-copilot .command-modal-head {
    display: none;
}
.layout-copilot .command-modal-section {
    gap: 10px;
}

.layout-copilot .history-list-container .command-list-preview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    overflow: hidden;
    text-overflow: initial;
    overflow-wrap: anywhere;
}

.layout-copilot .command-history-toolbar-actions {
    margin-left: auto;
}

.layout-copilot .settings-segmented-btn.ui-btn {
    min-width: 0;
}

html[data-theme="dark"] .copilot-topbar,
html[data-theme="dark"] .layout-copilot .bottom-dock {
    background: color-mix(in srgb, var(--bg-base) 94%, transparent);
}

html[data-theme="dark"] .copilot-side-panel {
    background: var(--bg-base);
}




/*# sourceMappingURL=main.72187dcf.css.map*/