/* BioStudio AI — Start menu (Windows 11) + toasts */

.start-menu {
  --start-pad-x: 26px;
  --start-mica: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.72) 0%,
    rgba(255, 255, 255, 0.42) 48%,
    rgba(248, 250, 255, 0.36) 100%
  );
  --start-search-bg: rgba(255, 255, 255, 0.78);
  --start-search-border: rgba(255, 255, 255, 0.7);
  --start-footer-bg: color-mix(in srgb, var(--ink) 5.5%, transparent);
  --start-chip-bg: rgba(255, 255, 255, 0.55);
  --start-chip-border: rgba(255, 255, 255, 0.55);
  --start-hover: color-mix(in srgb, var(--ink) 6%, transparent);
  --start-press: color-mix(in srgb, var(--ink) 9%, transparent);
  --start-plate: color-mix(in srgb, var(--ink) 4.5%, rgba(255, 255, 255, 0.45));
  --start-card: color-mix(in srgb, var(--ink) 4%, rgba(255, 255, 255, 0.28));
  /* Themes with flat, opaque surfaces (Mono, Carbon, Air, Nebula…) blank the
     sheen and the accent bloom so the glass highlights never ghost over them. */
  --start-sheen: rgba(255, 255, 255, 0.45);
  --start-sheen-strong: rgba(255, 255, 255, 0.72);
  --start-bloom: 1;
  --start-plate-line: color-mix(in srgb, var(--ink) 8%, transparent);
  /* Icon scale + plate shape. Themes that re-cut the artwork (see
     --app-icon-radius in base.css) also grow the icons, macOS-style. */
  --start-icon-size: 42px;
  --start-icon-box: 52px;
  --start-plate-radius: 16px;
  position: absolute;
  left: 50%;
  bottom: calc(var(--taskbar-h) + 14px);
  transform: translateX(-50%) translateY(22px) scale(0.96);
  transform-origin: 50% 100%;
  width: min(680px, calc(100vw - 16px));
  min-height: min(560px, calc(100dvh - var(--taskbar-h) - 36px));
  max-height: min(78vh, calc(100dvh - var(--taskbar-h) - 24px));
  display: flex;
  flex-direction: column;
  padding: 22px 0 0;
  overflow: hidden;
  isolation: isolate;
  background: var(--start-mica), var(--flyout-bg);
  backdrop-filter: blur(min(72px, var(--bs-max-blur, 72px))) saturate(1.85);
  -webkit-backdrop-filter: blur(min(72px, var(--bs-max-blur, 72px))) saturate(1.85);
  border: 1px solid color-mix(in srgb, var(--flyout-border) 70%, rgba(255, 255, 255, 0.55));
  border-radius: 28px;
  box-shadow:
    inset 0 1px 0 var(--start-sheen-strong),
    0 0 0 1px rgba(0, 0, 0, 0.03),
    0 10px 28px rgba(20, 30, 60, 0.1),
    0 36px 80px rgba(20, 30, 60, 0.22);
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.22s cubic-bezier(0.05, 0.7, 0.1, 1),
    transform 0.34s cubic-bezier(0.05, 0.7, 0.1, 1);
  z-index: 9500;
}
.start-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--start-bloom);
  background:
    radial-gradient(ellipse 70% 42% at 18% -8%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
    radial-gradient(ellipse 55% 38% at 92% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 62%);
}
.start-menu > * { position: relative; z-index: 1; }
.start-menu.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}
.start-menu[hidden] { display: none !important; }

#os.dark .start-menu,
.dark .start-menu {
  --start-mica: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.04) 46%,
    rgba(255, 255, 255, 0.02) 100%
  );
  --start-search-bg: rgba(255, 255, 255, 0.1);
  --start-search-border: rgba(255, 255, 255, 0.12);
  --start-footer-bg: rgba(255, 255, 255, 0.06);
  --start-chip-bg: rgba(255, 255, 255, 0.08);
  --start-chip-border: rgba(255, 255, 255, 0.1);
  --start-hover: rgba(255, 255, 255, 0.09);
  --start-press: rgba(255, 255, 255, 0.14);
  --start-plate: rgba(255, 255, 255, 0.08);
  --start-card: rgba(255, 255, 255, 0.06);
  --start-sheen: rgba(255, 255, 255, 0.1);
  --start-sheen-strong: rgba(255, 255, 255, 0.14);
  --start-plate-line: rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 10px 28px rgba(0, 0, 0, 0.32),
    0 36px 80px rgba(0, 0, 0, 0.5);
}

.start-home,
.start-all-pane,
.start-results {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px var(--start-pad-x) 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 120, 128, 0.35) transparent;
}
.start-home[hidden],
.start-all-pane[hidden],
.start-results[hidden] {
  display: none !important;
}

.start-categorized {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: auto;
  max-height: 48vh;
}
.start-cat-block { display: flex; flex-direction: column; gap: 6px; }
.start-cat-grid { grid-template-columns: repeat(6, 1fr); }
.start-cat-list { display: flex; flex-direction: column; gap: 2px; }

.start-searchbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  margin: 0 var(--start-pad-x);
  padding: 0 16px;
  min-height: 46px;
  background: var(--start-search-bg);
  border: 1px solid var(--start-search-border);
  border-radius: 999px;
  color: var(--ink-soft);
  box-shadow:
    0 8px 24px color-mix(in srgb, var(--accent) 10%, rgba(0, 0, 0, 0.04)),
    inset 0 1px 0 var(--start-sheen);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, transform 0.16s ease;
}
.start-searchbar:focus-within {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--start-search-border));
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent),
    0 12px 28px color-mix(in srgb, var(--accent) 16%, rgba(0, 0, 0, 0.08));
}
.start-searchbar .icon { width: 18px; height: 18px; flex: none; opacity: 0.7; }
.start-search {
  flex: 1;
  min-width: 0;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 12px 0 !important;
  font-size: 15px !important;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink) !important;
  border-radius: 0 !important;
  user-select: text;
  -webkit-user-select: text;
}
.start-search::placeholder { color: var(--ink-soft); }
.start-search::-webkit-search-cancel-button { cursor: pointer; }

.start-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  min-height: 28px;
  padding: 0 4px;
}
.start-section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: color-mix(in srgb, var(--ink) 82%, var(--ink-soft));
}
.start-allapps,
.start-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
  padding: 6px 12px 6px 14px;
  border-radius: 999px;
  background: var(--start-chip-bg);
  border: 1px solid var(--start-chip-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.start-allapps:hover,
.start-back:hover { background: var(--start-hover); }
.start-allapps:active,
.start-back:active { background: var(--start-press); }
.start-back { padding-left: 8px; }
.start-back .icon.flip { transform: rotate(180deg); }

.start-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px 4px;
}
.start-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 4px 8px;
  border-radius: 16px;
  color: var(--ink);
  transition: background 0.16s ease, transform 0.16s cubic-bezier(0.05, 0.7, 0.1, 1);
}
.start-menu.visible .start-tile {
  animation: start-tile-in 0.38s cubic-bezier(0.05, 0.7, 0.1, 1) both;
}
.start-tile:hover {
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--app-c, var(--accent)) 22%, transparent), transparent 72%),
    var(--start-hover);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--app-c, var(--accent)) 30%, transparent);
  transform: translateY(-3px);
}
.start-tile:hover .start-tile-icon { transform: translateY(-1px) scale(1.06); }
.start-tile:active { transform: scale(0.96); background: var(--start-press); }
.start-tile:focus-visible,
.start-all-row:focus-visible,
.start-rec:focus-visible,
.start-best:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--app-c, var(--accent)) 80%, var(--accent));
  outline-offset: 1px;
}
.start-tile-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--start-icon-box);
  height: var(--start-icon-box);
  border-radius: var(--start-plate-radius);
  background: var(--start-plate);
  box-shadow:
    inset 0 1px 0 var(--start-sheen),
    0 6px 16px rgba(20, 30, 50, 0.08);
  transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2), filter 0.22s ease;
}
.start-tile-icon .icon { width: 34px; height: 34px; }

/* Colored app icons are already rounded-square artwork; a grey plate behind
   one just reads as a box inside a box. Plate-less, they float on the app's
   own gradient in every theme, and only glyph/emoji icons keep a plate. */
.start-tile:not(.is-generic) .start-tile-icon,
.start-rec:not(.is-generic) .start-rec-icon,
.start-all-row:not(.is-generic) .start-all-icon,
.start-best:not(.is-generic) .start-best-icon {
  background: none;
  box-shadow: none;
}
.start-tile:not(.is-generic) .start-tile-icon .icon {
  width: var(--start-icon-size);
  height: var(--start-icon-size);
}
.start-tile:not(.is-generic) .start-tile-icon {
  filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--app-c, var(--accent)) 34%, transparent));
}
.start-rec:not(.is-generic) .start-rec-icon .icon { width: 36px; height: 36px; }
.start-all-row:not(.is-generic) .start-all-icon .icon { width: 32px; height: 32px; }
.start-best:not(.is-generic) .start-best-icon .icon { width: 50px; height: 50px; }

/* Glyph / emoji icons keep a plate, but a flat accent-tinted one with a
   hairline instead of the old glossy white pill. */
.start-tile.is-generic .start-tile-icon,
.start-rec.is-generic .start-rec-icon,
.start-all-row.is-generic .start-all-icon,
.start-best.is-generic .start-best-icon {
  background: linear-gradient(
    150deg,
    color-mix(in srgb, var(--accent) 20%, transparent),
    color-mix(in srgb, var(--accent) 7%, transparent)
  ), var(--start-plate);
  box-shadow: inset 0 0 0 1px var(--start-plate-line);
  color: color-mix(in srgb, var(--accent) 72%, var(--ink));
}
@keyframes start-tile-in {
  from { opacity: 0; transform: translateY(8px) scale(0.94); }
  to { opacity: 1; transform: none; }
}
.start-tile-notif-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #e81123;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  line-height: 16px;
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.start-tile-name {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.start-all-pane {
  position: relative;
  overflow: hidden;
}
.start-all-head {
  margin-bottom: 2px;
  flex: none;
  gap: 10px;
  justify-content: flex-start;
}
.start-all-head .start-section-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: auto;
}
.start-all-count {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  color: color-mix(in srgb, var(--accent) 78%, var(--ink));
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.start-all-count:empty { display: none; }

/* Segmented Categories / A-Z switch. */
.start-seg {
  position: relative;
  display: inline-flex;
  flex: none;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: var(--start-chip-bg);
  border: 1px solid var(--start-chip-border);
}
.start-seg-btn {
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  transition: color 0.16s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.start-seg-btn:hover { color: var(--ink); }
.start-seg-btn.is-on {
  color: var(--accent-ink, #fff);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 62%, #ffffff));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 34%, transparent);
}
.start-all {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: 8px;
}
.start-all.is-categorized {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 14px;
}
.start-cat { display: flex; flex-direction: column; gap: 8px; }
.start-cat-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 4px 7px;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--flyout-bg) 92%, transparent),
    color-mix(in srgb, var(--flyout-bg) 62%, transparent)
  );
  backdrop-filter: blur(min(14px, var(--bs-max-blur, 14px)));
  -webkit-backdrop-filter: blur(min(14px, var(--bs-max-blur, 14px)));
}
.start-cat-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--accent) 32%, transparent),
    transparent 78%
  );
}
.start-cat-name {
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 66%, var(--ink));
}
.start-cat-count {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}
.start-cat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px 4px;
  align-items: start;
}
/* Studio names are long; in the category grid they get two lines rather than
   an ellipsis that hides which studio a tile actually is. */
.start-cat-tiles .start-tile-name {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}

.start-letter-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 8px;
}
.start-letter-head {
  width: 40px;
  height: 40px;
  margin: 6px 6px 8px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.start-letter-head:hover { background: var(--start-hover); }
.start-letter-picker {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-content: start;
  gap: 6px;
  padding: 12px;
  overflow: auto;
  background: color-mix(in srgb, var(--flyout-bg) 88%, #fff);
  backdrop-filter: blur(min(24px, var(--bs-max-blur, 24px)));
  -webkit-backdrop-filter: blur(min(24px, var(--bs-max-blur, 24px)));
}
#os.dark .start-letter-picker,
.dark .start-letter-picker {
  background: color-mix(in srgb, var(--flyout-bg) 92%, #000);
}
.start-letter-key {
  min-height: 52px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.start-letter-key:hover:not(:disabled) { background: var(--start-hover); }
.start-letter-key:disabled { opacity: 0.28; cursor: default; }

.start-all-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 13.5px;
  color: var(--ink);
  text-align: left;
  transition: background 0.14s ease, box-shadow 0.16s ease;
}
.start-all-row:hover {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--app-c, var(--accent)) 14%, transparent), transparent 62%),
    var(--start-hover);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--app-c, var(--accent)) 22%, transparent);
}
.start-all-row:active { background: var(--start-press); }
.start-all-row .icon { width: 26px; height: 26px; }
.start-all-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--start-plate-radius);
  background: var(--start-plate);
}
.start-all-icon .start-tile-notif-badge { top: -4px; right: -6px; }
.start-all-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.start-all-name {
  min-width: 0;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.start-all-sub {
  font-size: 11.5px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.start-results { gap: 6px; }
.start-results-label {
  margin: 6px 8px 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}
.start-best {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  text-align: left;
  color: var(--ink);
  background: var(--start-card);
  box-shadow: inset 0 1px 0 var(--start-sheen);
  transition: background 0.16s ease, transform 0.16s ease;
}
.start-best:hover { background: var(--start-hover); transform: translateY(-1px); }
.start-best-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: var(--start-plate-radius);
  background: var(--start-plate);
}
.start-best-icon .icon { width: 40px; height: 40px; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.16)); }
.start-best-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.start-best-name {
  font-size: 15px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.start-best-sub { font-size: 12px; color: var(--ink-soft); }
.start-best-open {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  background: var(--start-chip-bg);
  border: 1px solid var(--start-chip-border);
}

.start-recommended {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-bottom: 4px;
}
.start-rec {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 16px;
  text-align: left;
  color: var(--ink);
  background: var(--start-card);
  transition: background 0.16s ease, transform 0.16s ease;
}
.start-rec:hover { background: var(--start-hover); transform: translateY(-1px); }
.start-rec:active { background: var(--start-press); transform: none; }
.start-rec-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--start-plate-radius);
  background: var(--start-plate);
}
.start-rec-icon .icon { width: 28px; height: 28px; }
.start-rec-text { min-width: 0; }
.start-rec-name {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.start-rec-sub { font-size: 11.5px; color: var(--ink-soft); }

.start-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  padding: 28px 12px;
}

.start-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  gap: 12px;
  margin: 8px 14px 14px;
  padding: 8px 10px;
  border-radius: 18px;
  background: var(--start-footer-bg);
  border: 1px solid color-mix(in srgb, var(--flyout-border) 55%, transparent);
  box-shadow: inset 0 1px 0 var(--start-sheen);
}
.start-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
  color: inherit;
  cursor: pointer;
  border-radius: 14px;
  padding: 6px 12px 6px 6px;
}
.start-user:hover { background: var(--start-hover); }
.start-user-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--start-plate);
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 4px 10px rgba(0, 0, 0, 0.08);
}
.start-power {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--ink);
}
.start-power:hover { background: var(--start-hover); }
.start-power:active { background: var(--start-press); }

@media (prefers-reduced-motion: reduce) {
  .start-menu {
    transition: opacity 0.01ms linear;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  .start-menu.visible .start-tile { animation: none; }
  .start-tile:hover .start-tile-icon,
  .start-tile:hover,
  .start-rec:hover,
  .start-best:hover,
  .start-searchbar:focus-within { transform: none; }
}

@media (max-width: 560px) {
  .start-grid { grid-template-columns: repeat(4, 1fr); }
  .start-cat-tiles { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
  .start-all-head { flex-wrap: wrap; }
  .start-recommended { grid-template-columns: 1fr; }
}

@media (max-height: 700px) {
  .start-menu { min-height: 0; }
}

/* Toasts */
.toast-layer {
  position: absolute;
  right: 14px;
  bottom: calc(var(--taskbar-h) + 14px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9600;
}
.toast {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 340px;
  padding: 14px;
  background: var(--flyout-bg);
  backdrop-filter: blur(min(30px, var(--bs-max-blur, 30px))) saturate(1.5);
  -webkit-backdrop-filter: blur(min(30px, var(--bs-max-blur, 30px))) saturate(1.5);
  border: 1px solid var(--flyout-border);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
  color: var(--ink);
  cursor: pointer;
  transform: translateX(130%);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.toast.show { transform: translateX(0); }
.toast.sticky {
  border-left: 3px solid var(--accent);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.38);
}
.toast.chat {
  border-left: 3px solid var(--accent);
}
.toast-icon { color: var(--accent); flex-shrink: 0; }
.toast-icon .icon { width: 22px; height: 22px; }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: 13px; font-weight: 700; }
.toast-message { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; white-space: pre-wrap; }
.toast-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  margin: -4px -4px 0 0;
}
.toast-close:hover { background: rgba(128, 128, 128, 0.18); color: var(--ink); }
.toast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.toast-action {
  padding: 5px 12px;
  border: 1px solid var(--flyout-border);
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.toast-action:hover { background: rgba(128, 128, 128, 0.14); }
.toast-action.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.toast-action.primary:hover { filter: brightness(1.08); background: var(--accent); }
.toast-group-toggle {
  display: block;
  margin-top: 6px;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.toast-group-toggle:hover { text-decoration: underline; }
.toast-group-list {
  margin-top: 8px;
  max-height: 140px;
  overflow-y: auto;
  border-top: 1px solid var(--flyout-border);
  padding-top: 6px;
}
.toast-group-item {
  font-size: 12px;
  color: var(--ink-soft);
  padding: 3px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:root {
  --input-bg: rgba(255, 255, 255, 0.7);
  --input-border: rgba(0, 0, 0, 0.1);
}
.dark {
  --input-bg: rgba(255, 255, 255, 0.06);
  --input-border: rgba(255, 255, 255, 0.12);
}
