/* OpenAI Console Design · dark product system · source: official public OpenAI UI observation · no branded assets */
/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5
 * component: Cloud service custom-theme white icon · theme: existing Jiminbox monochrome
 * macrostructure: existing SPA shell and service directory preserved
 * contrast: pass (40–41) · slop: pass, component scope · mobile: pass (34, 49–57)
 */

@font-face {
  font-family: "Square Sans Text VF";
  src: url("https://square-fonts-production-f.squarecdn.com/cash-sans/CashSans-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Square Sans Text VF";
  src: url("https://square-fonts-production-f.squarecdn.com/cash-sans/CashSans-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Square Sans Text VF";
  src: url("https://square-fonts-production-f.squarecdn.com/cash-sans/CashSans-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Square Sans Text VF";
  src: url("https://square-fonts-production-f.squarecdn.com/cash-sans/CashSans-Semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Square Sans Display VF";
  src: url("https://square-fonts-production-f.squarecdn.com/cash-sans/CashSans-Semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #000000;
  --bg-elevated: #000000;
  --surface: rgba(18, 18, 19, 0.78);
  --surface-2: rgba(28, 28, 30, 0.74);
  --surface-hover: rgba(255, 255, 255, 0.065);
  --border: rgba(255, 255, 255, 0.075);
  --border-light: rgba(255, 255, 255, 0.145);
  --text: #f5f5f7;
  --text-dim: #a1a1a6;
  --text-faint: #66666b;
  --accent: #ffffff;
  --accent-2: #d1d1d6;
  --accent-3: #8e8e93;
  --accent-soft: rgba(255, 255, 255, 0.095);
  --accent-border: rgba(255, 255, 255, 0.18);
  --green: #d8d8dc;
  --green-soft: rgba(255, 255, 255, 0.08);
  --red: #f5f5f7;
  --red-soft: rgba(255, 255, 255, 0.075);
  --status-danger: #ff6b6b;
  --yellow: #c7c7cc;
  --yellow-soft: rgba(255, 255, 255, 0.075);
  --blue: #e5e5ea;
  --blue-soft: rgba(255, 255, 255, 0.075);
  --brand-mono-logo: #ffffff;
  --brand-cloud-icon: #ffffff;
  --hermes-model-control-muted: #afafaf;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.52);
  --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-transition-duration: 180ms;
  --sidebar-transition-easing: cubic-bezier(0.2, 0, 0, 1);
  --sidebar-content-transition-duration: 150ms;
  --sidebar-brand-exit-duration: 90ms;
  --sidebar-content-exit-easing: cubic-bezier(0.7, 0, 0.84, 0);
  --sidebar-w: 260px;
  --sidebar-collapsed-w: 52px;
  --sidebar-header-h: 52px;
  --sidebar-header-nav-gap: 8px;
  --sidebar-nav-row-gap: 2px;
  --sidebar-primary-h: 40px;
  --sidebar-footer-h: 68px;
  --topbar-h: 0px;
  --hermes-message-gap: 24px;
  --hermes-turn-boundary-gap: 8px;
  --hermes-tool-gap: 6px;
  --hermes-content-max: 640px;
  --hermes-user-bubble-max: 490px;
  --hermes-model-popover-bg: #353535;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --sidebar-transition-duration: 0ms;
    --sidebar-content-transition-duration: 0ms;
    --sidebar-brand-exit-duration: 0ms;
  }
}

@media (min-width: 1280px) {
  :root {
    --hermes-content-max: 768px;
    --hermes-user-bubble-max: 540px;
  }
}

@media (min-width: 1600px) {
  :root {
    --hermes-content-max: 768px;
    --hermes-user-bubble-max: 590px;
  }
}

@media (min-width: 1920px) {
  :root {
    --hermes-content-max: 768px;
    --hermes-user-bubble-max: clamp(590px, 27vw, 690px);
  }
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f2ee;
  --bg-elevated: #ffffff;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-2: rgba(239, 239, 235, 0.96);
  --surface-hover: rgba(0, 0, 0, 0.06);
  --border: rgba(0, 0, 0, 0.13);
  --border-light: rgba(0, 0, 0, 0.20);
  --text: #151515;
  --text-dim: #626267;
  --text-faint: #94949a;
  --accent: #000000;
  --accent-2: #3f3f46;
  --accent-3: #6f6f76;
  --accent-soft: rgba(0, 0, 0, 0.055);
  --accent-border: rgba(0, 0, 0, 0.14);
  --green: #2f2f33;
  --green-soft: rgba(0, 0, 0, 0.055);
  --red: #2f2f33;
  --red-soft: rgba(0, 0, 0, 0.055);
  --status-danger: #c62828;
  --yellow: #4c4c52;
  --yellow-soft: rgba(0, 0, 0, 0.055);
  --blue: #2f2f33;
  --blue-soft: rgba(0, 0, 0, 0.055);
  --brand-mono-logo: #000000;
  --hermes-model-control-muted: #5f5f5f;
  --hermes-model-popover-bg: #ffffff;
  --shadow: 0 18px 46px rgba(34, 34, 30, 0.11);
  --shadow-lg: 0 30px 90px rgba(34, 34, 30, 0.16);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #000000;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body,
#app {
  background-color: #000000;
}

body {
  font-family: -apple-system-body, ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  background: #000000;
  color: var(--text);
  line-height: 1.55;
  letter-spacing: normal;
  font-feature-settings: normal;
  font-variation-settings: normal;
  text-rendering: auto;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 18%);
  z-index: -1;
}

@media (display-mode: standalone) {
  html,
  body {
    min-height: 100dvh;
    overscroll-behavior-y: none;
  }

  .app-shell,
  .auth-shell {
    min-height: 100dvh;
  }
}

/* === Layout === */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  background: #000000;
}

.auth-shell {
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
  background: #000000;
}

.sidebar {
  width: var(--sidebar-w);
  background: #000000;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 200;
  transition: width var(--sidebar-transition-duration) var(--sidebar-transition-easing), transform var(--transition);
  transition-delay: 0ms;
}

.sidebar-visual {
  position: relative;
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100%;
  overflow: visible;
  transition:
    width var(--sidebar-transition-duration) var(--sidebar-transition-easing),
    min-width var(--sidebar-transition-duration) var(--sidebar-transition-easing);
}

body.sidebar-collapsed .sidebar-visual {
  width: var(--sidebar-collapsed-w);
  min-width: var(--sidebar-collapsed-w);
}

body.sidebar-transitioning .sidebar {
  overflow: hidden;
}

.shell-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.10);
  pointer-events: none;
  z-index: 6;
}

.sidebar-backdrop {
  display: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.sidebar-backdrop:focus,
.sidebar-backdrop:focus-visible,
.sidebar-backdrop:active {
  outline: none;
  box-shadow: none;
}

.sidebar-header {
  height: var(--sidebar-header-h);
  min-height: var(--sidebar-header-h);
  flex: 0 0 var(--sidebar-header-h);
  padding: 0 8px 0 19px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  top: auto;
  z-index: 3;
  background: #000000;
  transition: padding var(--transition), gap var(--transition);
}

.sidebar-chrome-mask {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: paint;
  isolation: isolate;
  transform: translateZ(0);
  background: #000000;
}

html[data-theme="light"] .sidebar-chrome-mask {
  background: #fafaf7;
}

.sidebar-sticky-primary .sidebar-chrome-mask {
  bottom: 0;
}

.sidebar.sidebar-top-overlapping .sidebar-sticky-primary .sidebar-chrome-mask {
  bottom: -7px;
}

.sidebar-chrome-mask::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
}

.sidebar-header > :not(.sidebar-chrome-mask),
.sidebar-sticky-primary > :not(.sidebar-chrome-mask),
.sidebar-footer > :not(.sidebar-chrome-mask) {
  position: relative;
  z-index: 1;
}

.sidebar-logo {
  height: 34px;
  min-width: 0;
  flex: 1;
  padding: 0;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 1;
  position: relative;
  box-shadow: none;
  overflow: visible;
  cursor: default;
  transition: background var(--transition), color var(--transition), transform var(--transition), width var(--transition), height var(--transition), padding var(--transition), border-radius var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.sidebar-brand-full,
.sidebar-brand-short {
  position: absolute;
  left: 0;
  top: 50%;
  display: inline-block;
  width: 120px;
  max-width: 120px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  line-height: 1;
  font-weight: 760;
  letter-spacing: normal;
  opacity: 1;
  visibility: visible;
  transform-origin: left center;
  transform: translateY(-50%);
  transition:
    opacity var(--sidebar-content-transition-duration) linear,
    transform var(--sidebar-transition-duration) var(--sidebar-transition-easing),
    visibility 0s linear 0s;
  will-change: opacity, transform;
}

.sidebar-brand-short {
  position: fixed;
  left: 26px;
  top: 26px;
  width: 24px;
  max-width: 24px;
  font-size: 23px;
  font-weight: 780;
  letter-spacing: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform-origin: center;
  transform: translate(-50%, -50%) scale(0.9);
  transition:
    opacity var(--sidebar-content-transition-duration) linear,
    transform var(--sidebar-transition-duration) var(--sidebar-transition-easing),
    visibility 0s linear var(--sidebar-content-transition-duration);
}

.sidebar-brand-short.has-image {
  width: 30px;
  max-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 0;
  border-radius: 9px;
}

.sidebar-brand-image {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
  border-radius: 8px;
}

.sidebar-brand-full {
  position: fixed;
  left: 19px;
  top: 26px;
  line-height: 1.25;
  padding-block: 2px;
  text-align: left;
}

.sidebar-brand-hover {
  position: absolute;
  left: 29px;
  top: 50%;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--text);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 160ms ease, transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.sidebar-brand-hover .sidebar-toggle-icon {
  width: 22px;
  height: 22px;
  vertical-align: 0;
}

.logo-mark {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
  transition: filter var(--transition);
}

html[data-theme="light"] .logo-mark {
  filter: invert(1);
}

.sidebar-collapse-btn {
  width: 36px;
  min-width: 0;
  height: 36px;
  margin-right: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  transition:
    background var(--transition),
    color var(--transition),
    opacity var(--sidebar-content-transition-duration) var(--sidebar-transition-easing),
    visibility 0s linear 0s;
  flex: 0 0 36px;
  overflow: hidden;
}

.sidebar-collapse-btn:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.sidebar-toggle-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.nav-section {
  padding: 0 11px 8px 6px;
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.sidebar-primary {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--sidebar-nav-row-gap);
}

.sidebar-scroll-content {
  min-width: 0;
  position: relative;
}

.sidebar-sticky-primary {
  position: relative;
  top: auto;
  flex: 0 0 var(--sidebar-primary-h);
  min-height: var(--sidebar-primary-h);
  z-index: 3;
  margin: var(--sidebar-header-nav-gap) 0 0;
  padding: 4px 14px 0 6px;
  background: #000000;
}

.sidebar-sticky-primary::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 7px;
  background: inherit;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.sidebar.sidebar-top-overlapping .sidebar-sticky-primary::after {
  opacity: 1;
}

.sidebar-history-scroll {
  --sidebar-top-overlap-guard: 0px;
  position: absolute;
  top: calc(var(--sidebar-header-h) + var(--sidebar-header-nav-gap) + var(--sidebar-primary-h));
  right: 3px;
  bottom: var(--sidebar-footer-h);
  left: 0;
  padding-top: var(--sidebar-nav-row-gap);
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  contain: paint;
  clip-path: inset(var(--sidebar-top-overlap-guard) 0 0 0);
  scrollbar-gutter: stable;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar.sidebar-top-overlapping .sidebar-history-scroll {
  --sidebar-top-overlap-guard: 7px;
}

.sidebar-history-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.sidebar-scrollbar-rail {
  --sidebar-scrollbar-thumb-height: 52px;
  --sidebar-scrollbar-thumb-y: 0px;
  position: absolute;
  top: var(--sidebar-header-h);
  right: 3px;
  bottom: var(--sidebar-footer-h);
  width: 5px;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease-out;
}

.sidebar-scrollbar-thumb {
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: var(--sidebar-scrollbar-thumb-height);
  border-radius: 999px;
  background: rgba(174, 174, 178, 0.66);
  transform: translate3d(0, var(--sidebar-scrollbar-thumb-y), 0);
  will-change: transform;
}

.sidebar:hover .sidebar-scrollbar-rail,
.sidebar:focus-within .sidebar-scrollbar-rail,
.sidebar.sidebar-history-scrolling .sidebar-scrollbar-rail {
  opacity: 1;
}

.sidebar.sidebar-scrollbar-idle .sidebar-scrollbar-rail {
  opacity: 0;
}

html[data-theme="light"] .sidebar-scrollbar-thumb {
  background: rgba(72, 72, 74, 0.48);
}

.sidebar-history-scroll.has-overlay-scrollbar {
  margin-inline-end: 0;
  padding-inline-end: 0;
  scrollbar-gutter: auto;
}

.sidebar-history-scroll.is-overflowing {
  padding-inline-end: 0;
}

.sidebar-history-scroll.has-overlay-scrollbar.is-overflowing {
  padding-inline-end: 0;
}

.sidebar-recent {
  width: calc(var(--sidebar-w) - 20px);
  min-width: calc(var(--sidebar-w) - 20px);
  box-sizing: border-box;
  margin-top: 14px;
  padding: 4px 0 6px;
  overflow: hidden;
  white-space: nowrap;
  opacity: 1;
  visibility: visible;
  transition:
    opacity var(--sidebar-content-transition-duration) linear,
    visibility 0s linear 0s;
}

.sidebar-services {
  margin: 0;
  padding: 0;
}

.sidebar-service-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-services .nav-item {
  margin-bottom: 0;
}

.sidebar-section-label {
  display: block;
  padding: 8px 11px 6px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 620;
  letter-spacing: normal;
  line-height: 1.2;
  opacity: 1;
  visibility: visible;
  transition:
    opacity var(--sidebar-content-transition-duration) linear,
    visibility 0s linear 0s,
    -webkit-mask-size var(--sidebar-transition-duration) var(--sidebar-transition-easing),
    mask-size var(--sidebar-transition-duration) var(--sidebar-transition-easing);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 18px), transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.sidebar-recent .sidebar-section-label {
  color: #ffffff;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: normal;
}

.sidebar-pinned {
  display: block;
  margin-bottom: 8px;
}

.sidebar-pinned[hidden] {
  display: none !important;
}

.sidebar-pinned-label {
  min-height: 32px;
  box-sizing: border-box;
  padding: 6px 11px;
}

.sidebar-recent-toggle.sidebar-section-label {
  width: 100%;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
}

.sidebar-recent-toggle:hover,
.sidebar-recent-toggle:focus-visible {
  color: var(--text);
  outline: none;
}

.sidebar-recent-caret {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: currentColor;
  opacity: 1;
  visibility: visible;
  transform: rotate(90deg);
  transition: transform 180ms ease, color var(--transition), opacity 120ms ease, visibility 120ms ease;
}

.sidebar-recent:not(.collapsed) .sidebar-recent-caret {
  opacity: 0;
  visibility: hidden;
}

.sidebar-recent:not(.collapsed):hover .sidebar-recent-caret,
.sidebar-recent:not(.collapsed) .sidebar-recent-toggle:focus-visible .sidebar-recent-caret {
  opacity: 1;
  visibility: visible;
}

.sidebar-recent-caret .ui-icon {
  width: 15px;
  height: 15px;
}

.sidebar-recent.collapsed .sidebar-recent-caret {
  opacity: 1;
  visibility: visible;
  transform: rotate(0deg);
}

.sidebar-recent-toggle:hover .sidebar-recent-caret,
.sidebar-recent-toggle:focus-visible .sidebar-recent-caret {
  color: var(--text-dim);
}

.sidebar-section-label.sidebar-section-label-icon {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sidebar-section-label-mark {
  width: 13px;
  height: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: currentColor;
}

.sidebar-section-label-mark .ui-icon {
  width: 13px;
  height: 13px;
}

.sidebar-recent-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-recent.collapsed > .sidebar-recent-list,
.sidebar-recent-list[hidden] {
  display: none !important;
}

.sidebar-recent-row {
  position: relative;
  min-width: 0;
  border-radius: 12px;
  display: flex;
  align-items: stretch;
  transition: none;
}

.sidebar-recent-row:hover,
.sidebar-recent-row:focus-within,
.sidebar-recent-row.menu-open {
  background: var(--surface-hover);
}

.sidebar-recent-row.active {
  background: #1f1f1f;
}

.sidebar-recent-item {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  text-align: left;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 12px;
  cursor: pointer;
  touch-action: manipulation;
  transition: none;
}

.sidebar-pinned-conversation {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: currentColor;
}

.sidebar-pinned-conversation .ui-icon {
  width: 20px;
  height: 20px;
}

.sidebar-recent-ready-dot {
  position: absolute;
  right: 34px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ffffff;
  transform: translateY(-50%);
  pointer-events: none;
  transition: opacity 120ms ease;
}

.sidebar-recent-streaming-indicator {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 17px;
  height: 17px;
  box-sizing: border-box;
  border: 2px solid rgba(245, 245, 247, 0.24);
  border-right-color: #f5f5f7;
  border-radius: 50%;
  pointer-events: none;
  animation: sidebarRecentStreamingSpin 1400ms linear infinite;
  animation-delay: var(--sidebar-recent-stream-delay, 0ms);
}

@keyframes sidebarRecentStreamingSpin {
  from { transform: translateY(-50%) rotate(0deg); }
  to { transform: translateY(-50%) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-recent-streaming-indicator {
    animation: none;
    transform: translateY(-50%);
  }
}

.sidebar-recent-row.response-ready .sidebar-recent-title {
  color: #ffffff;
  font-weight: 520;
}

.sidebar-recent-row.streaming .sidebar-recent-item {
  padding-right: 38px;
}

.sidebar-recent-row.response-ready .sidebar-recent-item {
  padding-right: 50px;
}

.sidebar-recent-item:hover,
.sidebar-recent-item:focus-visible {
  color: var(--text);
  background: transparent;
  outline: none;
}

.sidebar-recent-row.active .sidebar-recent-item {
  color: #f5f5f7;
}

html[data-theme="dark"] .sidebar-recent-item,
html[data-theme="dark"] .sidebar-recent-title {
  color: #ffffff;
}

.sidebar-recent-pin-btn,
.sidebar-recent-menu-btn {
  position: absolute;
  top: 0;
  width: 34px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), color var(--transition);
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
}

.sidebar-recent-pin-btn {
  right: 24px;
}

.sidebar-recent-menu-btn {
  right: 0;
}

.sidebar-recent-pin-btn .sidebar-pin-icon {
  width: 16px;
  height: 16px;
}

.sidebar-recent-menu-btn .ui-icon {
  width: 18px;
  height: 18px;
}

.sidebar-recent-row:has(:focus-visible) .sidebar-recent-pin-btn,
.sidebar-recent-row:has(:focus-visible) .sidebar-recent-menu-btn,
.sidebar-recent-row.menu-open .sidebar-recent-pin-btn,
.sidebar-recent-row.menu-open .sidebar-recent-menu-btn {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-recent-row:has(:focus-visible) .sidebar-recent-ready-dot,
.sidebar-recent-row.menu-open .sidebar-recent-ready-dot {
  opacity: 0;
}

.sidebar-recent-row:has(:focus-visible) .sidebar-recent-item,
.sidebar-recent-row.menu-open .sidebar-recent-item {
  padding-right: 66px;
}

@media (hover: hover) and (pointer: fine) {
  .sidebar-recent-row:hover .sidebar-recent-pin-btn,
  .sidebar-recent-row:hover .sidebar-recent-menu-btn {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-recent-row:hover .sidebar-recent-item {
    padding-right: 66px;
  }

  .sidebar-recent-row:hover .sidebar-recent-ready-dot {
    opacity: 0;
  }
}

@media (hover: none), (pointer: coarse) {
  .sidebar-recent-pin-btn {
    display: none;
  }

  .sidebar-recent-menu-btn {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-recent-ready-dot {
    right: 42px;
  }

  .sidebar-recent-item,
  .sidebar-recent-row:has(:focus-visible) .sidebar-recent-item,
  .sidebar-recent-row.menu-open .sidebar-recent-item {
    padding-right: 42px;
  }
}

.sidebar-recent-pin-btn:hover,
.sidebar-recent-pin-btn:focus-visible,
.sidebar-recent-menu-btn:hover,
.sidebar-recent-menu-btn:focus-visible,
.sidebar-recent-row.menu-open .sidebar-recent-menu-btn {
  background: transparent;
  color: var(--text);
  outline: none;
}

.sidebar-recent-menu {
  position: fixed;
  inset: auto;
  left: var(--sidebar-recent-menu-left, 0);
  top: var(--sidebar-recent-menu-top, 0);
  right: auto;
  bottom: auto;
  margin: 0;
  width: 169px;
  box-sizing: border-box;
  max-height: calc(100dvh - 16px);
  padding: 6px 0;
  border-radius: 16px;
  border: 0;
  background: #353535;
  box-shadow:
    0 8px 16px rgba(0,0,0,0.32),
    inset 0 0 1px rgba(255,255,255,0.20),
    0 0 1px rgba(0,0,0,0.62);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-2px) scale(0.98);
  transform-origin: top left;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
  z-index: 260;
}

.sidebar-recent-pin-btn:disabled,
.sidebar-recent-pin-menu-item:disabled,
.sidebar-recent-archive:disabled,
.sidebar-recent-rename:disabled {
  opacity: 0.42;
  cursor: default;
}

.sidebar-recent-row.menu-open .sidebar-recent-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.sidebar-recent-row.menu-open:not(.menu-positioned) .sidebar-recent-menu {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sidebar-recent-row.menu-open-up .sidebar-recent-menu {
  transform-origin: bottom left;
}

.sidebar-recent-pin-menu-item,
.sidebar-recent-rename,
.sidebar-recent-archive,
.sidebar-recent-delete {
  width: calc(100% - 12px);
  min-height: 36px;
  margin: 0 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #ff6b61;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 6px 32px 6px 10px;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  cursor: pointer;
}

.sidebar-recent-pin-menu-item {
  color: var(--text);
}

.sidebar-recent-rename {
  color: var(--text);
}

.sidebar-recent-archive {
  color: var(--text);
}

.sidebar-recent-pin-menu-item .sidebar-pin-icon,
.sidebar-recent-rename .ui-icon,
.sidebar-recent-archive .ui-icon,
.sidebar-recent-delete .ui-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.sidebar-recent-pin-menu-item:hover,
.sidebar-recent-pin-menu-item:focus-visible,
.sidebar-recent-rename:hover,
.sidebar-recent-rename:focus-visible,
.sidebar-recent-archive:hover,
.sidebar-recent-archive:focus-visible {
  background: rgba(255,255,255,0.08);
  outline: none;
}

.sidebar-recent-delete:hover,
.sidebar-recent-delete:focus-visible {
  background: rgba(255,80,70,0.12);
  outline: none;
}

.sidebar-recent-title,
.sidebar-recent-meta {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-recent-title {
  font-size: 14px;
  line-height: 20px;
  font-weight: 430;
  letter-spacing: normal;
}

.sidebar-recent-meta,
.sidebar-recent-empty {
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 500;
}

.sidebar-recent-empty {
  padding: 6px 11px 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme="light"] .sidebar-recent-menu {
  background: #ffffff;
  box-shadow:
    0 8px 20px rgba(0,0,0,0.14),
    inset 0 0 1px rgba(255,255,255,0.74),
    0 0 1px rgba(0,0,0,0.16);
}

html[data-theme="light"] .sidebar-recent-menu-btn:hover,
html[data-theme="light"] .sidebar-recent-menu-btn:focus-visible,
html[data-theme="light"] .sidebar-recent-row.menu-open .sidebar-recent-menu-btn {
  background: transparent;
}

html[data-theme="light"] .sidebar-recent-ready-dot {
  background: #151515;
}

html[data-theme="light"] .sidebar-recent-streaming-indicator {
  border-color: rgba(21, 21, 21, 0.22);
  border-right-color: #151515;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 14px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  transition: none;
  cursor: pointer;
  user-select: none;
  margin-bottom: 1px;
}

.nav-item:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: none;
}

.sidebar-primary > .nav-item,
.sidebar-sticky-primary > .nav-item,
.sidebar-services .nav-item,
.nav-group-toggle[data-service-group-toggle="services"] {
  color: var(--text);
  height: 36px;
  min-height: 36px;
  gap: 6px;
  padding: 6px 10px;
  margin-bottom: 0;
  border-radius: 10px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: normal;
}

.sidebar-primary > .nav-item[data-route="/"],
.sidebar-primary > .nav-item[data-route="/"].active,
.sidebar-sticky-primary > .nav-item[data-route="/"],
.sidebar-sticky-primary > .nav-item[data-route="/"].active,
.sidebar-primary > .admin-nav-root,
.sidebar-primary > .admin-nav-root.active,
.sidebar-services .nav-item,
.sidebar-services .nav-item.active {
  font-weight: 400;
}

.sidebar-primary > .nav-item .nav-text,
.sidebar-sticky-primary > .nav-item .nav-text,
.sidebar-services .nav-item .nav-text {
  width: auto;
  max-width: none;
  flex: 1 1 auto;
}

.sidebar-primary > .nav-item .nav-icon,
.sidebar-sticky-primary > .nav-item .nav-icon,
.nav-group-toggle[data-service-group-toggle="services"] .nav-icon {
  width: 20px;
  height: 20px;
}

.sidebar-primary > .nav-item .nav-icon .ui-icon,
.sidebar-sticky-primary > .nav-item .nav-icon .ui-icon,
.nav-group-toggle[data-service-group-toggle="services"] .nav-icon .ui-icon {
  width: 20px;
  height: 20px;
}

.sidebar-primary > .nav-item[data-route="/"] .nav-icon .new-chat-compose-icon,
.sidebar-sticky-primary > .nav-item[data-route="/"] .nav-icon .new-chat-compose-icon {
  width: 20px;
  height: 20px;
  display: block;
  vertical-align: 0;
}

.nav-group-toggle[data-service-group-toggle="services"] .nav-group-caret {
  display: none;
}

.nav-item.nav-group-item {
  color: var(--text-dim);
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 1px;
}

.nav-item.nav-group-item[data-service-group-toggle="services"] {
  color: var(--text);
  font-weight: 500;
}


.nav-group-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  appearance: none;
  font-family: inherit;
  text-align: left;
}

.nav-group-caret {
  width: 16px;
  height: 16px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  color: var(--text-faint);
  opacity: 0.82;
  transform: rotate(0deg);
  transition: transform 180ms ease, opacity var(--transition), color var(--transition);
}

.nav-group-caret .ui-icon {
  width: 15px;
  height: 15px;
}

.nav-service-group.open > .nav-group-toggle .nav-group-caret {
  color: var(--text-dim);
  opacity: 1;
  transform: rotate(180deg);
}

.nav-item.nav-group-item:hover,
.nav-item.nav-group-item:focus-visible {
  color: var(--text);
  background: var(--surface-hover);
  outline: none;
}

html[data-theme="light"] .sidebar-recent-pin-menu-item:hover,
html[data-theme="light"] .sidebar-recent-pin-menu-item:focus-visible,
html[data-theme="light"] .sidebar-recent-archive:hover,
html[data-theme="light"] .sidebar-recent-archive:focus-visible {
  background: rgba(0,0,0,0.06);
}

.nav-subitems {
  margin: 0 0 0 14px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: max-height 240ms cubic-bezier(0.4, 0, 0.2, 1), opacity 180ms ease, transform 240ms cubic-bezier(0.4, 0, 0.2, 1), margin 240ms cubic-bezier(0.4, 0, 0.2, 1), border-color 180ms ease;
}

.nav-service-group.open > .nav-subitems {
  margin: -2px 0 8px 14px;
  max-height: 180px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-service-group[data-service-group="services"].open > .nav-subitems {
  max-height: 620px;
  overflow: visible;
}

.nav-service-group[data-service-group="services"] > .nav-subitems {
  margin-left: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .nav-subitems {
    transition: none;
  }
}

.nav-item.nav-child-item {
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 18px;
  margin-bottom: 1px;
}

.nav-item.nav-child-item .nav-icon,
.nav-item.nav-child-item .nav-icon .ui-icon,
.nav-item.nav-child-item .nav-icon .brand-logo {
  width: 17px;
  height: 17px;
}

.nav-text {
  flex: 0 0 auto;
  width: 172px;
  min-width: 0;
  max-width: 172px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 1;
  visibility: visible;
  transform: none;
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 18px), transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  transition:
    opacity var(--sidebar-content-transition-duration) linear,
    visibility 0s linear 0s,
    -webkit-mask-size var(--sidebar-transition-duration) var(--sidebar-transition-easing),
    mask-size var(--sidebar-transition-duration) var(--sidebar-transition-easing);
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: currentColor;
}

.ui-icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: -0.125em;
}

.nav-icon .ui-icon,
.nav-icon .brand-logo,
.card-title-icon .ui-icon {
  width: 20px;
  height: 20px;
}

.sidebar-collapse-btn .sidebar-toggle-icon {
  width: 20px;
  height: 20px;
  vertical-align: 0;
}

.sidebar-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 8px;
  background: #000000;
  font-size: 12px;
  flex-shrink: 0;
}

.sidebar-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.sidebar.history-overflowing .sidebar-footer::before { opacity: 1; }
body.sidebar-collapsed .sidebar-footer::before,
body.sidebar-collapsed .sidebar.history-overflowing .sidebar-footer::before { opacity: 0; }

.user-chip {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 6px 6px 0;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.user-chip:hover,
.user-chip:focus-visible {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.04);
  outline: none;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 650;
  color: var(--text);
  flex-shrink: 0;
}

.user-meta {
  width: 166px;
  min-width: 0;
  max-width: 166px;
  flex: 0 0 166px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transform: none;
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 18px), transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  transition:
    opacity var(--sidebar-content-transition-duration) var(--sidebar-transition-easing),
    visibility 0s linear 0s;
}

body.sidebar-content-exiting .sidebar-collapse-btn,
body.sidebar-content-exiting .user-meta {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--sidebar-brand-exit-duration) var(--sidebar-content-exit-easing),
    visibility 0s linear var(--sidebar-brand-exit-duration);
}

.user-name {
  font-size: 14px;
  line-height: 1.2;
  color: var(--text);
  font-weight: 520;
  letter-spacing: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-subtitle {
  font-size: 12.5px;
  line-height: 1.15;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


body.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-w);
  transition-delay: 0ms;
}

body.sidebar-collapsed .main-area {
  margin-left: var(--sidebar-collapsed-w);
  transition-delay: 0ms;
}

body.sidebar-collapsed .sidebar-header {
  padding: 0;
  height: var(--sidebar-header-h);
  justify-content: flex-start;
  flex-direction: row;
  gap: 0;
}

body.sidebar-collapsed .nav-text,
body.sidebar-collapsed .sidebar-section-label {
  opacity: 0;
  visibility: hidden;
  transform: none;
  pointer-events: none;
  -webkit-mask-size: 0% 100%;
  mask-size: 0% 100%;
  transition:
    opacity var(--sidebar-content-transition-duration) linear,
    visibility 0s linear var(--sidebar-content-transition-duration),
    -webkit-mask-size var(--sidebar-transition-duration) var(--sidebar-transition-easing),
    mask-size var(--sidebar-transition-duration) var(--sidebar-transition-easing);
}

body.sidebar-collapsed .sidebar-recent {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--sidebar-content-transition-duration) linear,
    visibility 0s linear var(--sidebar-content-transition-duration);
}

body.sidebar-collapsed .nav-service-group[data-service-group="services"] > .nav-subitems {
  max-height: none;
  overflow: visible;
}

body.sidebar-collapsed .user-meta {
  width: 0;
  max-width: 0;
  flex-basis: 0;
  opacity: 0;
  visibility: hidden;
  transform: none;
  pointer-events: none;
  transition:
    opacity var(--sidebar-brand-exit-duration) var(--sidebar-content-exit-easing),
    visibility 0s linear var(--sidebar-brand-exit-duration);
}

body.sidebar-collapsed .sidebar-logo {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 0;
  margin: 0 8px;
  border-radius: 8px;
  justify-content: center;
  cursor: pointer;
  overflow: visible;
  transition-delay: 0ms;
}

body.sidebar-collapsed .sidebar-brand-full {
  max-width: 120px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%);
  pointer-events: none;
  transition:
    opacity var(--sidebar-brand-exit-duration) linear,
    transform var(--sidebar-transition-duration) var(--sidebar-transition-easing),
    visibility 0s linear var(--sidebar-brand-exit-duration);
}

body.sidebar-collapsed .sidebar-brand-short {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
  transition:
    opacity var(--sidebar-content-transition-duration) linear,
    transform var(--sidebar-transition-duration) var(--sidebar-transition-easing),
    visibility 0s linear 0s;
}

body.sidebar-collapsed .sidebar-brand-hover {
  left: 50%;
}

body.sidebar-collapsed .sidebar-logo:hover .sidebar-brand-short,
body.sidebar-collapsed .sidebar-logo:focus-visible .sidebar-brand-short {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition-delay: 0ms;
}

body.sidebar-collapsed .sidebar-logo:hover .sidebar-brand-hover,
body.sidebar-collapsed .sidebar-logo:focus-visible .sidebar-brand-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition-delay: 70ms;
}

body.sidebar-collapsed .sidebar-logo:hover,
body.sidebar-collapsed .sidebar-logo:focus-visible {
  background: var(--surface-hover);
  outline: none;
}

body.sidebar-collapsed .sidebar-collapse-btn {
  width: 0;
  flex-basis: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    background var(--transition),
    color var(--transition),
    opacity var(--sidebar-brand-exit-duration) var(--sidebar-content-exit-easing),
    visibility 0s linear var(--sidebar-brand-exit-duration);
}

body.sidebar-collapsed .sidebar-history-scroll {
  right: 0;
  margin-inline-end: 0;
  padding-inline-end: 0;
  overflow: visible;
}

body.sidebar-collapsed .sidebar-scrollbar-rail {
  display: none;
}

body.sidebar-collapsed .sidebar-sticky-primary {
  position: relative;
  top: auto;
  padding: 4px 6px 0;
}

body.sidebar-collapsed .sidebar-sticky-primary::after {
  opacity: 0;
}

body.sidebar-collapsed .nav-section {
  padding: 0 6px 8px;
  overflow: visible;
}

body.sidebar-collapsed .nav-service-group {
  position: relative;
}

body.sidebar-collapsed .nav-subitems {
  position: absolute;
  left: calc(100% + 12px);
  top: 0;
  width: max-content;
  min-width: 180px;
  max-width: min(280px, calc(100vw - 96px));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: none;
  margin: 0;
  padding: 8px;
  border-left: 0;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  background: rgba(24, 24, 26, 0.96);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  opacity: 0;
  visibility: hidden;
  overflow: visible;
  pointer-events: none;
  transform: translateX(-4px) scale(0.98);
  transform-origin: left top;
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
  z-index: 540;
}

body.sidebar-collapsed .nav-service-group[data-service-group="services"] > .nav-subitems {
  top: -6px;
  max-height: min(620px, calc(100vh - 18px));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body.sidebar-collapsed .nav-service-group[data-service-group="services"] > .nav-subitems .nav-item {
  max-width: 100%;
}

body.sidebar-collapsed .nav-service-group.open > .nav-subitems {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

body.sidebar-collapsed .nav-item {
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 12px;
}

body.sidebar-collapsed .sidebar-sticky-primary > .nav-item,
body.sidebar-collapsed .sidebar-primary > .nav-item,
body.sidebar-collapsed .sidebar-services .sidebar-service-list > .nav-item {
  width: 40px;
  min-width: 40px;
  margin-inline: 0;
  padding-inline: 10px;
  justify-content: center;
  gap: 0;
}

body.sidebar-collapsed .nav-subitems .nav-child-item {
  width: 100%;
  margin: 0;
  padding: 8px 9px;
  color: var(--text-dim);
}

body.sidebar-collapsed .nav-subitems .nav-child-item:hover,
body.sidebar-collapsed .nav-subitems .nav-child-item:focus-visible {
  color: var(--text);
  background: var(--surface-hover);
  outline: none;
}

body.sidebar-collapsed .nav-subitems .nav-child-item .nav-text {
  display: block;
  width: auto;
  max-width: 190px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-mask-image: none;
  mask-image: none;
  -webkit-mask-size: auto;
  mask-size: auto;
}

body.sidebar-collapsed .nav-subitems .nav-group-toggle .nav-text {
  display: block;
  width: auto;
  max-width: 190px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  overflow: visible;
  text-overflow: clip;
  -webkit-mask-image: none;
  mask-image: none;
  -webkit-mask-size: auto;
  mask-size: auto;
}

body.sidebar-collapsed .nav-subitems .nav-group-toggle {
  width: 100%;
  margin: 0;
  padding: 8px 9px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 20px;
  font-weight: 560;
}

body.sidebar-collapsed .nav-subitems .nav-tooltip,
body.sidebar-collapsed .nav-service-group.open .nav-group-toggle .nav-tooltip {
  display: none;
}

body.sidebar-collapsed .nav-group-caret {
  display: none;
}

body.sidebar-collapsed .nav-group-toggle[data-service-group-toggle="jiminbox-portal"],
body.sidebar-collapsed .nav-group-toggle[data-service-group-toggle="jiminbox-portal"]:hover,
body.sidebar-collapsed .nav-group-toggle[data-service-group-toggle="jiminbox-portal"]:focus-visible,
body.sidebar-collapsed .nav-service-group[data-service-group="jiminbox-portal"].open > .nav-group-toggle,
body.sidebar-collapsed .nav-service-group[data-service-group="jiminbox-portal"].open > .nav-group-toggle:hover,
body.sidebar-collapsed .nav-service-group[data-service-group="jiminbox-portal"].open > .nav-group-toggle:focus-visible,
body.sidebar-collapsed .nav-group-toggle[data-service-group-toggle="jiminbox-portal"].active,
body.sidebar-collapsed .nav-group-toggle[data-service-group-toggle="jiminbox-portal"].active:hover,
body.sidebar-collapsed .nav-group-toggle[data-service-group-toggle="jiminbox-portal"].active:focus-visible {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.sidebar-collapsed .nav-group-toggle[data-service-group-toggle="jiminbox-portal"] .nav-tooltip,
body.sidebar-collapsed .nav-service-group[data-service-group="jiminbox-portal"].open > .nav-subitems {
  background: #111111 !important;
  background-image: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.sidebar-collapsed .nav-service-group[data-service-group="jiminbox-portal"].open > .nav-subitems > .nav-child-item:hover,
body.sidebar-collapsed .nav-service-group[data-service-group="jiminbox-portal"].open > .nav-subitems > .nav-child-item:focus-visible {
  background: #1a1a1a;
  background-image: none;
  box-shadow: none;
}


body.sidebar-collapsed .sidebar-footer {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 8px 0 14px;
}

body.sidebar-collapsed .user-chip {
  width: 40px;
  height: 40px;
  min-height: 40px;
  flex: 0 0 40px;
  justify-content: flex-start;
  align-items: center;
  gap: 0;
  padding: 2px;
  margin: 0 6px;
  border-radius: 13px;
  background: transparent;
  position: relative;
}

body.sidebar-collapsed .user-avatar {
  width: 34px;
  height: 34px;
  opacity: 1;
  visibility: visible;
  transform: none;
}

body.sidebar-collapsed .user-chip:hover {
  background: var(--surface-hover);
}


.nav-tooltip {
  display: none;
}

body.sidebar-collapsed .nav-item,
body.sidebar-collapsed .user-chip {
  position: relative;
}

body.sidebar-collapsed .nav-tooltip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  width: max-content;
  min-width: 0;
  max-width: min(320px, calc(100vw - 96px));
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(24, 24, 26, 0.96);
  color: var(--text);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  display: flex;
  flex-direction: column;
  gap: 3px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) translateX(-4px) scale(0.98);
  transform-origin: left center;
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
  pointer-events: none;
  z-index: 520;
}


body.sidebar-collapsed .nav-tooltip strong {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  min-width: 0;
  max-width: 100%;
  -webkit-mask-image: none;
  mask-image: none;
}

body.sidebar-transitioning .nav-tooltip,
body.sidebar-transitioning.sidebar-collapsed .nav-subitems {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: none !important;
}

body.sidebar-transitioning .nav-subitems {
  transition: none !important;
  transform: none !important;
}

body.sidebar-collapsed .nav-tooltip strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.15px;
}

body.sidebar-collapsed .nav-tooltip-menu {
  width: max-content;
  min-width: 0;
  max-width: min(320px, calc(100vw - 96px));
  padding: 8px;
  gap: 6px;
}

body.sidebar-collapsed .nav-group-toggle[data-service-group-toggle="services"] .nav-tooltip-menu {
  top: 0;
  max-height: min(620px, calc(100vh - 18px));
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(-4px) scale(0.98);
  transform-origin: left top;
}

body.sidebar-collapsed .nav-group-toggle[data-service-group-toggle="services"]:hover .nav-tooltip-menu,
body.sidebar-collapsed .nav-group-toggle[data-service-group-toggle="services"]:focus-visible .nav-tooltip-menu {
  transform: translateX(0) scale(1);
}

body.sidebar-collapsed .nav-tooltip-heading {
  padding: 2px 4px 4px;
  max-width: 100%;
}

body.sidebar-collapsed .nav-tooltip-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.08);
  max-width: 100%;
}

body.sidebar-collapsed .nav-tooltip-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 7px 8px;
  border-radius: 11px;
  color: var(--text);
  max-width: 100%;
}

body.sidebar-collapsed .nav-tooltip-row-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  color: var(--text-dim);
}

body.sidebar-collapsed .nav-tooltip-row-icon .brand-logo,
body.sidebar-collapsed .nav-tooltip-row-icon .ui-icon {
  width: 18px;
  height: 18px;
}

body.sidebar-collapsed .nav-tooltip-row-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 100%;
}

body.sidebar-collapsed .nav-tooltip-row-main strong {
  font-size: 12px;
  font-weight: 620;
  line-height: 1.2;
}


body.sidebar-collapsed .nav-item:hover .nav-tooltip,
body.sidebar-collapsed .nav-item:focus-visible .nav-tooltip,
body.sidebar-collapsed .user-chip:hover .nav-tooltip,
body.sidebar-collapsed .user-chip:focus-visible .nav-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0) scale(1);
}

html[data-theme="light"] body.sidebar-collapsed .nav-tooltip {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
}

html[data-theme="light"] body.sidebar-collapsed .nav-subitems {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
}

html[data-theme="light"] body.sidebar-collapsed .nav-tooltip-list {
  border-top-color: rgba(0,0,0,0.10);
}


@media (max-width: 900px) {
  body.sidebar-collapsed .nav-tooltip {
    display: none;
  }
}

.login-link {
  display: block;
  text-align: center;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
}

.login-link:hover {
  background: var(--accent-border);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 900;
  max-width: min(360px, calc(100vw - 32px));
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(20,20,22,0.94);
  color: var(--text);
  box-shadow: 0 18px 54px rgba(0,0,0,0.38);
  backdrop-filter: blur(14px) saturate(1.12);
  -webkit-backdrop-filter: blur(14px) saturate(1.12);
  font-size: 12px;
  line-height: 1.3;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.main-area {
  flex: 1;
  margin-left: var(--sidebar-w);
  --content-max: 1180px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #000000;
  transition: margin-left var(--sidebar-transition-duration) var(--sidebar-transition-easing);
  transition-delay: 0ms;
}

.topbar {
  height: var(--topbar-h);
  background: #000000;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
}

.topbar-context {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  letter-spacing: -0.1px;
}

.topbar-product {
  color: var(--text-dim);
  font-weight: 560;
}

.topbar-separator {
  color: var(--text-faint);
}

.topbar-section {
  color: var(--text);
  font-weight: 650;
}

.topbar-actions {
  margin-left: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-dim);
  padding: 5px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.07);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 30px;
  padding: 0;
  margin-left: auto;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.045);
  color: var(--text-dim);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.theme-toggle:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.075);
}

.theme-toggle .ui-icon {
  width: 14px;
  height: 14px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.content-area {
  padding: 30px 32px max(40px, env(safe-area-inset-bottom));
  flex: 1;
  overflow-y: auto;
  max-width: var(--content-max);
  margin-inline: auto;
  min-height: calc(100vh);
  min-height: calc(100dvh);
  width: 100%;
  background: transparent;
}

@supports (-webkit-touch-callout: none) {
  html,
  body,
  #app,
  .app-shell,
  .auth-shell,
  .main-area {
    min-height: -webkit-fill-available;
  }

  .content-area {
    min-height: -webkit-fill-available;
  }
}

.page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 26px;
}

.page-kicker {
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.page-heading {
  color: var(--text);
  font-size: clamp(34px, 4vw, 52px);
  line-height: 0.98;
  font-weight: 760;
  letter-spacing: -0.055em;
  margin: 0;
}

.page-description {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 12px;
  max-width: 520px;
}

.page-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--text-dim);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.075);
  font-size: 12px;
  font-weight: 600;
}

.meta-pill.live {
  color: var(--text);
}

/* === Dashboard metrics === */
.stats-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 28px;
  padding: 4px 0 18px;
  border-bottom: 1px solid rgba(255,255,255,0.065);
  overflow-x: auto;
}

.stat-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0 28px 0 0;
  margin-right: 28px;
  box-shadow: none;
  backdrop-filter: none;
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: max-content;
  position: relative;
}

.stat-card:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(255,255,255,0.075);
}

.stat-icon {
  width: 18px;
  height: 18px;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  color: var(--text-faint);
}

.stat-icon .ui-icon {
  width: 17px;
  height: 17px;
}

.stat-icon.running,
.stat-icon.completed,
.stat-icon.failed,
.stat-icon.pending,
.stat-icon.accepted,
.stat-icon.total {
  background: transparent;
  color: var(--text-faint);
}

.stat-body {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stat-value {
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 760;
  line-height: 1.1;
  letter-spacing: -0.06em;
}

.stat-label {
  font-size: 13px;
  color: var(--text-dim);
  text-transform: none;
  letter-spacing: -0.02em;
  margin-top: 0;
  white-space: nowrap;
}

/* === Minimal dashboard === */
.content-area.route-dashboard .page-hero {
  margin-bottom: 18px;
}

.dashboard-minimal {
  max-width: 1040px;
}

.dashboard-overview {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 0 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.overview-label {
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.overview-number {
  color: var(--text);
  font-size: clamp(64px, 10vw, 112px);
  line-height: 0.88;
  font-weight: 780;
  letter-spacing: -0.075em;
}

.overview-caption {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 14px;
}

.overview-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-bottom: 8px;
}

.overview-actions a,
.minimal-section-head a {
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 620;
  text-decoration: none;
  transition: color var(--transition);
}

.overview-actions a:hover,
.minimal-section-head a:hover {
  color: var(--text);
}

.dashboard-minimal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 42px;
}

.minimal-section {
  min-width: 0;
}

.minimal-section-head {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.minimal-section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 680;
  letter-spacing: -0.02em;
}


.minimal-service-list,
.minimal-activity-list {
  border-top: 1px solid rgba(255,255,255,0.08);
}

.minimal-service-row,
.minimal-activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

a.minimal-service-row {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

a.minimal-service-row:hover,
a.minimal-service-row:focus-visible {
  background: rgba(255,255,255,0.035);
  color: var(--text);
  outline: none;
  transform: translateX(2px);
}

.minimal-service-logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.minimal-service-logo .brand-logo {
  width: 24px;
  height: 24px;
}

.minimal-service-logo.claude .brand-logo,
.minimal-service-logo.claude-web-search .brand-logo {
  color: var(--brand-claude-logo);
}

.minimal-service-logo.firecrawl .brand-logo {
  color: var(--brand-firecrawl-logo);
}

.minimal-service-logo.api-keys {
  color: var(--text-dim);
}

.minimal-service-logo.jiminbox-portal {
  color: var(--text-dim);
}

.minimal-service-logo.hermes,
.minimal-service-logo.risu,
.minimal-service-logo.new-api,
.minimal-service-logo.gitlab,
.minimal-service-logo.plex,
.minimal-service-logo.opencloud,
.minimal-service-logo.fns,
.minimal-service-logo.vpn {
  color: var(--brand-mono-logo);
}

.theme-logo-mask {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  background: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  mask-mode: alpha;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.theme-logo-image {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.hermes-agent-logo {
  background-color: currentColor;
  mask: url("/static/hermes-agent-logo.svg?v=20260709-hermes-openwebui-model-routing-v1") center / contain no-repeat;
  -webkit-mask: url("/static/hermes-agent-logo.svg?v=20260709-hermes-openwebui-model-routing-v1") center / contain no-repeat;
  mask-image: url("/static/hermes-agent-logo.svg?v=20260709-hermes-openwebui-model-routing-v1");
  -webkit-mask-image: url("/static/hermes-agent-logo.svg?v=20260709-hermes-openwebui-model-routing-v1");
}

.risu-logo {
  mask-image: url("/static/risuai-logo.svg?v=v402");
  -webkit-mask-image: url("/static/risuai-logo.svg?v=v402");
}

.opencloud-logo {
  mask-image: url("/static/opencloud-logo.svg?v=v402");
  -webkit-mask-image: url("/static/opencloud-logo.svg?v=v402");
}

.obsidian-logo {
  mask-image: url("/static/obsidian-logo.svg?v=v402");
  -webkit-mask-image: url("/static/obsidian-logo.svg?v=v402");
}

.wireguard-logo {
  mask-image: url("/static/wireguard-logo.svg?v=v402");
  -webkit-mask-image: url("/static/wireguard-logo.svg?v=v402");
}

.newapi-logo {
  mask-image: url("/static/newapi-logo.svg?v=20260709-hermes-openwebui-model-routing-v1");
  -webkit-mask-image: url("/static/newapi-logo.svg?v=20260709-hermes-openwebui-model-routing-v1");
}

.gitlab-logo {
  mask-image: url("/static/gitlab-logo.svg?v=20260709-hermes-openwebui-model-routing-v1");
  -webkit-mask-image: url("/static/gitlab-logo.svg?v=20260709-hermes-openwebui-model-routing-v1");
}

.immich-logo {
  background-image: url("/static/immich-logo-white.svg?v=20260709-hermes-openwebui-model-routing-v1");
}

html[data-theme="light"] .immich-logo {
  background-image: url("/static/immich-logo-black.svg?v=20260709-hermes-openwebui-model-routing-v1");
}

.plex-logo {
  background-image: url("/static/plex-logo-white.svg?v=20260709-hermes-openwebui-model-routing-v1");
}

html[data-theme="light"] .plex-logo {
  background-image: url("/static/plex-logo-black.svg?v=20260709-hermes-openwebui-model-routing-v1");
}

.roon-logo-color {
  background-color: currentColor;
  mask: url("/static/roon-logo.svg?v=v402") center / contain no-repeat;
  -webkit-mask: url("/static/roon-logo.svg?v=v402") center / contain no-repeat;
}

.roon-wordmark-color {
  background-color: currentColor;
  mask: url("/static/roon-wordmark.svg?v=v402") center / contain no-repeat;
  -webkit-mask: url("/static/roon-wordmark.svg?v=v402") center / contain no-repeat;
}

.claude-logo-mono {
  mask-image: url("/static/service-claude-color.svg?v=20260709-hermes-openwebui-model-routing-v1");
  -webkit-mask-image: url("/static/service-claude-color.svg?v=20260709-hermes-openwebui-model-routing-v1");
}

.firecrawl-logo-mono {
  mask-image: url("/static/service-firecrawl-color.svg?v=20260709-hermes-openwebui-model-routing-v1");
  -webkit-mask-image: url("/static/service-firecrawl-color.svg?v=20260709-hermes-openwebui-model-routing-v1");
}

.minimal-service-main,
.minimal-activity-row > div {
  min-width: 0;
  flex: 1;
}

.minimal-service-main strong,
.minimal-activity-row strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.minimal-activity-row small {
  display: block;
  margin-top: 2px;
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.2;
}

.minimal-service-main .minimal-service-desc,
.minimal-service-main code,
.minimal-activity-row code {
  display: block;
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.minimal-service-main .minimal-service-desc {
  font-family: inherit;
  font-size: 12px;
  letter-spacing: -0.01em;
}

.minimal-service-main code,
.minimal-activity-row code {
  font-family: ui-monospace, "SF Mono", "Fira Code", monospace;
}

.minimal-service-group {
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.minimal-service-group > .minimal-service-row {
  border-bottom: 0;
}

.minimal-service-children {
  margin: -4px 0 8px 42px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.08);
}

.minimal-service-row.child {
  padding: 10px 0 10px 12px;
  border-bottom: 0;
}

.minimal-service-row.child .minimal-service-logo {
  width: 24px;
  height: 24px;
}

.minimal-service-row.child .minimal-service-logo .brand-logo {
  width: 20px;
  height: 20px;
}

.minimal-service-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  margin-left: auto;
  opacity: 0.72;
  transition: color var(--transition), opacity var(--transition);
}

a.minimal-service-row:hover .minimal-service-action,
a.minimal-service-row:focus-visible .minimal-service-action {
  color: var(--text);
  opacity: 1;
}

.minimal-service-action .ui-icon {
  width: 15px;
  height: 15px;
}

.minimal-activity-row {
  justify-content: space-between;
}

.minimal-activity-row span {
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  margin-left: 12px;
}

.minimal-empty {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 0;
  color: var(--text-dim);
  font-size: 13px;
}

html[data-theme="light"] .dashboard-overview,
html[data-theme="light"] .minimal-service-list,
html[data-theme="light"] .minimal-activity-list,
html[data-theme="light"] .minimal-service-row,
html[data-theme="light"] .minimal-activity-row,
html[data-theme="light"] .minimal-empty {
  border-color: rgba(0,0,0,0.12);
}

@media (max-width: 760px) {
  .dashboard-overview {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-actions {
    justify-content: flex-start;
    padding-bottom: 0;
  }

  .dashboard-minimal-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* === Card === */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035));
  border: 1px solid var(--border);
  border-radius: 24px;
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.2);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}

.card-body {
  padding: 0;
}

.card-body.padded {
  padding: 18px;
}

/* === Table === */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 12px 18px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 12px 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover {
  background: var(--surface-hover);
}

.cell-mono {
  font-family: "SF Mono", "JetBrains Mono", "Fira Code", monospace;
  font-size: 12px;
  color: var(--text-dim);
}

.cell-truncate {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actions-column {
  width: 160px;
  min-width: 160px;
  padding-inline: 10px;
  text-align: left;
}

.api-key-column {
  min-width: 160px;
}

.api-key-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.api-key-prefix {
  color: var(--text-dim);
}

.api-keys-table {
  table-layout: fixed;
  min-width: 940px;
}

.api-keys-table col.api-key-label-col { width: 13%; }
.api-keys-table col.api-key-id-col { width: 24%; }
.api-keys-table col.api-key-material-col { width: 20%; }
.api-keys-table col.api-key-owner-col { width: 13%; }
.api-keys-table col.api-key-last-used-col { width: 13%; }
.api-keys-table col.api-key-actions-col { width: 17%; }

.api-keys-table th,
.api-keys-table td {
  min-width: 0;
  padding-inline: 18px;
}

.api-keys-table .actions-column {
  width: auto;
  min-width: 0;
  padding-inline: 18px;
  text-align: left;
}

.api-keys-table .api-key-material-column {
  min-width: 0;
}

.api-keys-table .api-key-cell {
  min-width: 0;
}

.api-keys-table .api-key-prefix {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subject-cell {
  min-width: 220px;
  max-width: 360px;
}

.history-table {
  table-layout: fixed;
  min-width: 1280px;
}

.history-table col.history-status-col { width: 10%; }
.history-table col.history-type-col { width: 8%; }
.history-table col.history-subject-col { width: 25%; }
.history-table col.history-output-col { width: 32%; }
.history-table col.history-user-col { width: 9%; }
.history-table col.history-api-col { width: 9%; }
.history-table col.history-created-col { width: 7%; }

.history-table th:nth-child(2),
.history-table td:nth-child(2) {
  white-space: nowrap;
  word-break: keep-all;
}

.history-table .subject-cell {
  min-width: 0;
  max-width: none;
}

.history-table .cell-truncate {
  max-width: none;
}

.history-table th,
.history-table td {
  min-width: 0;
}

.history-table th:last-child,
.history-table td:last-child {
  white-space: nowrap;
}

.subject-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subject-subtitle {
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.35;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === Badges === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-running { background: var(--blue-soft); color: var(--blue); }
.badge-completed { background: var(--green-soft); color: var(--green); }
.badge-failed { background: var(--red-soft); color: var(--red); }
.badge-pending { background: var(--yellow-soft); color: var(--yellow); }
.badge-accepted { background: var(--accent-soft); color: var(--accent); }

/* === Empty state === */
.empty-state {
  padding: 48px 24px;
  text-align: center;
}

.empty-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  opacity: 0.4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}

.empty-icon .ui-icon {
  width: 36px;
  height: 36px;
}

.empty-text {
  color: var(--text-dim);
  font-size: 14px;
}

/* === Controls === */
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.history-toolbar,
.logs-toolbar {
  gap: 8px;
}

.history-toolbar .select,
.logs-toolbar .select {
  min-height: 42px;
}

.select, .input {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  transition: border-color var(--transition);
  outline: none;
  color-scheme: dark;
}

.select option,
.input option {
  background: #111113;
  color: #f5f5f7;
}

.select option:checked,
.select option:hover,
.select option:focus,
.input option:checked,
.input option:hover,
.input option:focus {
  background: #f5f5f7;
  color: #050505;
}

.select:focus, .input:focus {
  border-color: var(--accent);
}

.input {
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: #f5f5f7;
  color: #050505;
  box-shadow: none;
}

.btn-primary:hover {
  opacity: 0.90;
  transform: translateY(-1px);
  box-shadow: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.btn-danger {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid transparent;
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.2);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  white-space: nowrap;
}

.action-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-dim);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.action-icon-btn:hover,
.action-icon-btn:focus-visible {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--text);
  transform: translateY(-1px);
  outline: none;
}

.action-icon-btn.danger:hover,
.action-icon-btn.danger:focus-visible {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.34);
  color: var(--red);
}

.action-icon-btn.copied {
  background: rgba(52, 211, 153, 0.16);
  border-color: rgba(52, 211, 153, 0.34);
  color: var(--green);
}

.action-icon-btn:disabled {
  opacity: 0.36;
  cursor: not-allowed;
  transform: none;
}

.action-icon-btn .ui-icon {
  width: 16px;
  height: 16px;
}

.toolbar-refresh-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.toolbar-refresh-btn .ui-icon {
  width: 19px;
  height: 19px;
}

.inline-copy-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.inline-copy-btn:hover,
.inline-copy-btn:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-light);
  color: var(--text);
  transform: translateY(-1px);
  outline: none;
}

.inline-copy-btn.copied {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.30);
  color: var(--green);
}

.inline-copy-btn:disabled {
  opacity: 0.34;
  cursor: not-allowed;
  transform: none;
}

.inline-copy-btn .ui-icon {
  width: 14px;
  height: 14px;
}

.action-logo-icon {
  width: 17px;
  height: 17px;
  display: inline-block;
  flex: 0 0 auto;
  background: currentColor;
  mask: url("/static/hermes-agent-logo.svg?v=20260709-hermes-openwebui-model-routing-v1") center / contain no-repeat;
  -webkit-mask: url("/static/hermes-agent-logo.svg?v=20260709-hermes-openwebui-model-routing-v1") center / contain no-repeat;
}

.btn .action-logo-icon {
  width: 18px;
  height: 18px;
  margin-right: 7px;
  vertical-align: -3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === Log viewer === */
.log-viewer {
  max-height: 65vh;
  overflow-y: auto;
  font-family: "SF Mono", "JetBrains Mono", "Fira Code", monospace;
  font-size: 12px;
  line-height: 1.7;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.24);
}

.log-entry {
  display: flex;
  gap: 10px;
  padding: 1px 0;
  align-items: baseline;
}

.log-time {
  color: var(--text-faint);
  flex-shrink: 0;
  font-size: 11px;
}

.log-level {
  flex-shrink: 0;
  font-weight: 600;
  min-width: 56px;
  font-size: 11px;
}

.log-level-ERROR { color: var(--red); }
.log-level-WARNING { color: var(--yellow); }
.log-level-INFO { color: var(--green); }
.log-level-DEBUG { color: var(--text-faint); }

.log-logger {
  color: var(--accent);
  flex-shrink: 0;
  font-size: 11px;
}

.log-message {
  color: var(--text);
  word-break: break-word;
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(18px) saturate(1.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  animation: fadeIn 0.15s ease;
}

.modal-overlay.confirm-overlay {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: rgba(22, 22, 28, 0.86);
  border: 1px solid var(--border-light);
  border-radius: 28px;
  backdrop-filter: blur(26px) saturate(1.25);
  box-shadow: var(--shadow-lg);
  max-width: 520px;
  width: 90%;
  overflow: hidden;
  animation: slideUp 0.2s ease;
}

.modal.confirm-modal {
  width: min(316px, calc(100vw - 32px));
  max-width: 316px;
  padding: 16px;
  border-radius: 24px;
  background: #101010;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 16px 48px rgba(0,0,0,0.40);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.modal.confirm-modal.confirm-modal-verified {
  width: min(380px, calc(100vw - 32px));
  max-width: 380px;
}

.confirm-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.confirm-title {
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.3;
  font-weight: 670;
  letter-spacing: -0.02em;
}

.confirm-close {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  padding: 0;
}

.confirm-close:hover,
.confirm-close:focus-visible {
  color: var(--text);
  background: rgba(255,255,255,0.07);
  outline: none;
}

.confirm-close .ui-icon {
  width: 16px;
  height: 16px;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 20px;
  padding: 0;
  line-height: 1;
}

.modal-body {
  padding: 20px;
}

.confirm-message {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.confirm-detail-list {
  display: grid;
  gap: 5px;
  margin: 12px 0 0;
  padding: 0 0 0 18px;
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.4;
}

.confirm-verification {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 12px;
}

.confirm-verification .input {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 14px;
}

.confirm-actions .btn {
  min-height: 34px;
  padding: 6px 13px;
  border-radius: 999px;
}

html[data-theme="light"] .modal.confirm-modal {
  background: #ffffff;
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 18px 46px rgba(25,25,20,0.15);
}

html[data-theme="light"] .confirm-close:hover,
html[data-theme="light"] .confirm-close:focus-visible {
  background: rgba(0,0,0,0.055);
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* === Key created display === */
.key-display {
  background: var(--bg);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 12px;
}

.key-display-label {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.key-display-value {
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--text);
  word-break: break-all;
  user-select: all;
  padding: 8px;
  background: var(--surface);
  border-radius: var(--radius-sm);
}

/* === Hermes integration === */
.integration-copy {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 16px;
}

.integration-copy code,
.setup-note code,
.setup-step-label code {
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 0.92em;
  color: var(--text);
  background: var(--accent-soft);
  border-radius: 7px;
  padding: 1px 5px;
}

.setup-step {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.agent-setup-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.agent-setup-card.primary {
  border-color: var(--border-light);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
}

.agent-setup-eyebrow {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-setup-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.agent-setup-card .integration-copy {
  margin-bottom: 0;
}

.full-width {
  width: 100%;
  justify-content: center;
}

.advanced-setup {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.advanced-setup summary {
  color: var(--text-dim);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  list-style-position: inside;
}

.advanced-setup[open] summary {
  color: var(--text);
}

.setup-step-label {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.snippet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.snippet-row code,
.snippet-row pre {
  min-width: 0;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  margin: 0;
}

.snippet-row .btn {
  justify-content: center;
}

.setup-note {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.55;
}

/* === Pagination === */
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

/* === API Key form === */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.role-segment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.09);
}

.role-option {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  text-align: left;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.role-option span {
  color: inherit;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.role-option small {
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.35;
}

.role-option:hover {
  background: rgba(255,255,255,0.055);
  color: var(--text);
}

.role-option.active {
  background: #f5f5f7;
  border-color: rgba(255,255,255,0.72);
  color: #050505;
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
}

.role-option.active small {
  color: rgba(5,5,5,0.58);
}

/* === Loading skeleton === */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

.skeleton-line {
  height: 14px;
  margin-bottom: 8px;
}

/* === Responsive === */
@media (max-width: 900px) {
  body.mobile-sidebar-open {
    overflow: hidden;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 130;
    width: min(var(--sidebar-w), 86vw);
    max-width: var(--sidebar-w);
    transform: translateX(-100%);
    box-shadow: 18px 0 48px rgba(0,0,0,0.46);
    transition: transform 220ms ease;
  }

  .sidebar-visual,
  body.sidebar-collapsed .sidebar-visual {
    width: 100%;
    min-width: 0;
  }

  body.sidebar-collapsed .sidebar {
    width: min(var(--sidebar-w), 86vw);
    transform: translateX(-100%);
  }

  .sidebar.open,
  body.mobile-sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(0,0,0,0.58);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  body.mobile-sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .main-area,
  body.sidebar-collapsed .main-area {
    margin-left: 0;
    min-width: 0;
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    left: 12px;
    z-index: 118;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: 0;
    backdrop-filter: none;
  }

  .mobile-menu-btn .ui-icon {
    width: 24px;
    height: 24px;
  }

  .content-area {
    padding: 18px 16px max(28px, env(safe-area-inset-bottom));
  }
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: opacity var(--transition), transform var(--transition), background var(--transition), border-color var(--transition);
}

.mobile-menu-btn:hover {
  background: transparent;
  border-color: transparent;
  opacity: 0.72;
}

.mobile-menu-btn:focus-visible {
  background: transparent;
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .mobile-menu-btn {
    display: inline-flex;
    background: transparent;
    border: 0;
    padding: 0;
  }
}

@media (max-width: 600px) {
  .content-area {
    padding: 14px;
  }

  .page-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
  }

  .page-heading {
    font-size: 34px;
  }

  .page-meta {
    justify-content: flex-start;
  }

  .stats-row {
    padding-bottom: 14px;
    margin-bottom: 20px;
  }

  .stat-card {
    padding-right: 20px;
    margin-right: 20px;
  }

  .topbar {
    padding: 0 14px;
  }
}

/* === Login page === */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  min-height: 100vh;
  background: #000000;
  padding: 24px;
}

.login-card {
  background: linear-gradient(180deg, rgba(28, 28, 34, 0.86), rgba(16, 16, 21, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 32px;
  padding: 42px 36px 34px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(30px) saturate(1.25);
}

.login-logo {
  width: 154px;
  height: 78px;
  margin: 0 auto 22px;
  border-radius: 22px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  overflow: hidden;
}

.login-title {
  font-size: 26px;
  font-weight: 780;
  text-align: center;
  letter-spacing: -0.9px;
  margin-bottom: 4px;
}

.login-subtitle {
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 24px;
}

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

.login-error {
  color: var(--red);
  font-size: 13px;
  min-height: 18px;
  text-align: center;
}

.login-btn {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.login-divider {
  text-align: center;
  color: var(--text-faint);
  font-size: 12px;
  margin: 16px 0;
  position: relative;
}

.login-divider::before,
.login-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--border);
}

.login-divider::before { left: 0; }
.login-divider::after { right: 0; }

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

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

/* === Neutral black / white modern polish === */
body::before {
  background: none;
}

.sidebar {
  background: #000000;
}


.nav-item.active {
  color: #f5f5f7;
  background: #1f1f1f;
  box-shadow: none;
}

.nav-item.active .ui-icon {
  color: #f5f5f7;
}

.topbar {
  background: rgba(5, 5, 5, 0.68);
  backdrop-filter: blur(24px) saturate(1.05);
}

.card,
.login-card,
.modal {
  background: linear-gradient(180deg, rgba(255,255,255,0.062), rgba(255,255,255,0.028));
  border-color: rgba(255,255,255,0.082);
  backdrop-filter: blur(20px) saturate(1.02);
}

.card:hover {
  border-color: rgba(255,255,255,0.15);
}

.stat-icon.running,
.stat-icon.completed,
.stat-icon.failed,
.stat-icon.pending,
.stat-icon.accepted,
.stat-icon.total {
  background: transparent;
  color: var(--text-faint);
}

.stat-value {
  color: #f5f5f7;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.btn-primary {
  background: #f5f5f7;
  color: #050505;
  box-shadow: none;
}

.btn-primary:hover {
  opacity: 0.90;
  transform: translateY(-1px);
  box-shadow: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.058);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.13);
}

.btn-secondary:hover,
.select:focus,
.input:focus {
  border-color: rgba(255,255,255,0.32);
}

.btn-danger {
  background: rgba(255, 255, 255, 0.055);
  color: #f5f5f7;
  border: 1px solid rgba(255,255,255,0.12);
}

.btn-danger:hover {
  background: rgba(255,255,255,0.10);
}

.badge-running,
.badge-completed,
.badge-failed,
.badge-pending,
.badge-accepted {
  background: rgba(255,255,255,0.072);
  color: #d1d1d6;
}

.live-dot {
  background: #f5f5f7;
}

.login-page {
  background: #000000;
}

.login-card {
  background: linear-gradient(180deg, rgba(22,22,24,0.88), rgba(12,12,13,0.86));
  border-color: rgba(255,255,255,0.10);
}

.login-card::before {
  content: none;
}

.login-logo {
  filter: drop-shadow(0 18px 40px rgba(255,255,255,0.045));
}

.key-display {
  background: rgba(0,0,0,0.26);
  border-color: rgba(255,255,255,0.16);
}

.key-display-label,
.log-level-ERROR,
.log-level-WARNING,
.log-level-INFO,
.log-logger {
  color: #d1d1d6;
}

.input::placeholder {
  color: rgba(245, 245, 247, 0.30);
}

.btn .ui-icon,
.key-display-label .ui-icon,
.modal-title .ui-icon {
  width: 16px;
  height: 16px;
}


.login-logo .logo-mark {
  width: 72px;
  height: 72px;
}

/* === Light mode === */
html[data-theme="light"],
html[data-theme="light"] body,
html[data-theme="light"] #app {
  background-color: #f2f2ee;
}

html[data-theme="light"] body,
html[data-theme="light"] .app-shell,
html[data-theme="light"] .auth-shell,
html[data-theme="light"] .main-area {
  background:
    radial-gradient(circle at 50% -10%, rgba(0, 0, 0, 0.055), transparent 31%),
    linear-gradient(180deg, #f8f8f4 0%, #f2f2ee 48%, #e9e9e4 100%);
}

html[data-theme="light"] body::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), transparent 24%),
    radial-gradient(circle at 50% 0%, rgba(0, 0, 0, 0.035), transparent 38%);
}

html[data-theme="light"] .sidebar {
  background: rgba(250, 250, 247, 0.86);
  box-shadow: 14px 0 34px rgba(40, 40, 35, 0.055);
  backdrop-filter: blur(24px) saturate(1.04);
}

html[data-theme="light"] .sidebar-header,
html[data-theme="light"] .sidebar-sticky-primary,
html[data-theme="light"] .sidebar-footer {
  background: rgb(250, 250, 247);
}

html[data-theme="light"] .sidebar::after {
  background: rgba(0, 0, 0, 0.14);
}

html[data-theme="light"] .page-heading,
html[data-theme="light"] .stat-value {
  color: #151515;
}

html[data-theme="light"] .nav-item.active {
  color: #151515;
  background: #e7e7e4;
}

html[data-theme="light"] .nav-item.active .ui-icon {
  color: #151515;
}

html[data-theme="light"] .nav-item:hover,
html[data-theme="light"] .user-chip:hover {
  background: rgba(0, 0, 0, 0.055);
}

html[data-theme="light"] .topbar {
  background: rgba(250, 250, 247, 0.86);
  border-bottom-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 10px 26px rgba(35, 35, 30, 0.045);
  backdrop-filter: blur(24px) saturate(1.04);
}

html[data-theme="light"] .card,
html[data-theme="light"] .login-card,
html[data-theme="light"] .modal {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,248,245,0.94));
  border-color: rgba(0,0,0,0.135);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.90) inset,
    0 16px 42px rgba(35, 35, 30, 0.11);
}

html[data-theme="light"] .card:hover {
  border-color: rgba(0,0,0,0.22);
}

html[data-theme="light"] .stats-row,
html[data-theme="light"] .card-header,
html[data-theme="light"] .table th,
html[data-theme="light"] .table td {
  border-color: rgba(0,0,0,0.12);
}

html[data-theme="light"] .stat-card:not(:last-child)::after,
html[data-theme="light"] .metric-divider {
  background: rgba(0,0,0,0.14);
}

html[data-theme="light"] .btn-primary {
  background: #151515;
  color: #f8f8f5;
}

html[data-theme="light"] .btn-secondary,
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .live-indicator,
html[data-theme="light"] .meta-pill,
html[data-theme="light"] .badge-running,
html[data-theme="light"] .badge-completed,
html[data-theme="light"] .badge-failed,
html[data-theme="light"] .badge-pending,
html[data-theme="light"] .badge-accepted {
  background: rgba(0, 0, 0, 0.065);
  border-color: rgba(0, 0, 0, 0.13);
  color: #3d3d42;
}

html[data-theme="light"] .btn-secondary:hover,
html[data-theme="light"] .theme-toggle:hover,
html[data-theme="light"] .action-icon-btn:hover,
html[data-theme="light"] .action-icon-btn:focus-visible {
  background: rgba(0, 0, 0, 0.075);
  border-color: rgba(0, 0, 0, 0.16);
  color: #151515;
}

html[data-theme="light"] .btn-danger {
  background: rgba(0, 0, 0, 0.045);
  color: #151515;
  border-color: rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .action-icon-btn {
  background: rgba(0, 0, 0, 0.045);
  border-color: rgba(0, 0, 0, 0.12);
  color: #55555b;
}

html[data-theme="light"] .action-icon-btn.danger:hover,
html[data-theme="light"] .action-icon-btn.danger:focus-visible {
  background: rgba(185, 28, 28, 0.10);
  border-color: rgba(185, 28, 28, 0.24);
  color: #b91c1c;
}

html[data-theme="light"] .input,
html[data-theme="light"] .select,
html[data-theme="light"] textarea,
html[data-theme="light"] .key-display,
html[data-theme="light"] .log-viewer {
  background: rgba(255, 255, 255, 0.92);
  color: #151515;
  border-color: rgba(0,0,0,0.16);
  box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset;
}

html[data-theme="light"] .select option,
html[data-theme="light"] .input option {
  background: #ffffff;
  color: #151515;
}

html[data-theme="light"] .input::placeholder {
  color: rgba(21, 21, 21, 0.62);
}

html[data-theme="light"] .login-page {
  background:
    radial-gradient(circle at 50% 10%, rgba(0, 0, 0, 0.055), transparent 34%),
    linear-gradient(180deg, #f8f8f4, #e9e9e4);
}

html[data-theme="light"] .login-subtitle,
html[data-theme="light"] .form-label {
  color: #55555b;
}

html[data-theme="light"] .user-avatar,
html[data-theme="light"] .role-segment,
html[data-theme="light"] .empty-state-icon {
  background: rgba(0, 0, 0, 0.065);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .user-chip {
  background: transparent;
  border-color: transparent;
}

html[data-theme="light"] .user-chip:hover,
html[data-theme="light"] .user-chip:focus-visible {
  background: rgba(0, 0, 0, 0.055);
  border-color: rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] body.sidebar-collapsed .user-chip {
  background: transparent;
  border-color: transparent;
}

html[data-theme="light"] .role-option.active {
  background: #151515;
  color: #f8f8f5;
}

html[data-theme="light"] .role-option.active small {
  color: rgba(248, 248, 245, 0.72);
}

html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
}

/* === Brand logos === */
:root {
  --brand-claude-logo: #ffffff;
  --brand-firecrawl-logo: #ffffff;
}

html[data-theme="light"] {
  --brand-claude-logo: #000000;
  --brand-firecrawl-logo: #000000;
}

.brand-logo {
  width: 1em;
  height: 1em;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: -0.125em;
}

.brand-logo-img {
  display: block;
  object-fit: contain;
  object-position: center;
  vertical-align: 0;
}

.claude-logo {
  color: var(--brand-claude-logo);
}

.firecrawl-logo {
  color: var(--brand-firecrawl-logo);
}

/* === Dashboard service cards === */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.service-status-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.service-status-card:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.service-icon .brand-logo {
  width: 28px;
  height: 28px;
}

.service-icon.claude {
  background: rgba(255, 255, 255, 0.08);
}
.service-icon.claude .brand-logo {
  color: var(--brand-claude-logo);
}
html[data-theme="light"] .service-icon.claude {
  background: rgba(0, 0, 0, 0.055);
}

.service-icon.firecrawl {
  background: rgba(255, 255, 255, 0.08);
}
.service-icon.firecrawl .brand-logo {
  color: var(--brand-firecrawl-logo);
}
html[data-theme="light"] .service-icon.firecrawl {
  background: rgba(0, 0, 0, 0.055);
}

.service-body {
  flex: 1;
  min-width: 0;
}

.service-name {
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 2px;
}

.service-url {
  font-size: 11px;
  font-family: ui-monospace, "SF Mono", "Fira Code", monospace;
  color: var(--text-dim);
  word-break: break-all;
  margin-bottom: 6px;
}

.service-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 10px;
}

/* Search API: one quiet workbench for overview and service-key workflows. */
.content-area.route-integrations,
.content-area.route-integrations-claude-web-search,
.content-area.route-integrations-firecrawl {
  max-width: none;
  overflow-x: hidden;
}

.search-api-workbench {
  width: min(100%, 880px);
  min-height: calc(100dvh - 30px - max(40px, env(safe-area-inset-bottom)));
  min-width: 0;
  margin: 0 auto;
  padding: clamp(56px, 9vw, 104px) clamp(22px, 6vw, 72px) max(56px, env(safe-area-inset-bottom));
}

.search-api-workbench-head {
  padding-bottom: 28px;
  border-bottom: 0;
}

.search-api-workbench-head h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.search-api-workbench-head p {
  max-width: 600px;
  margin: 12px 0 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.58;
}

.search-api-service-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.search-api-service-tab {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-dim);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 620;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.search-api-service-tab .brand-logo {
  width: 17px;
  height: 17px;
}

.search-api-service-tab:hover,
.search-api-service-tab:focus-visible {
  border-color: transparent;
  background: var(--surface-hover);
  color: var(--text);
}

.search-api-service-tab:hover {
  outline: none;
}

.search-api-service-tab:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.search-api-service-tab.active {
  border-color: transparent;
  background: var(--surface-2);
  color: var(--text);
}

.search-api-service-tab.active .claude-logo,
.search-api-service-tab.active .firecrawl-logo {
  color: currentColor;
}

.search-api-workbench-body {
  display: grid;
  gap: 28px;
  min-width: 0;
  padding-top: 30px;
}

.search-api-endpoint-block {
  min-width: 0;
}

.search-api-endpoint-label {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.search-api-endpoint {
  max-width: 100%;
  min-height: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.search-api-endpoint code {
  min-width: 0;
  max-width: 100%;
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}

.search-api-endpoint > .inline-copy-btn {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.search-api-endpoint .ui-icon.code-copy-icon {
  width: 17px;
  height: 17px;
}

.search-api-endpoint > .inline-copy-btn:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: transparent;
}

.search-api-endpoint > .inline-copy-btn:focus-visible {
  color: var(--text);
  background: var(--surface-hover);
  border-color: transparent;
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.search-api-key-section,
.search-api-key-list {
  min-width: 0;
  padding: 0;
  border: 0;
  border-bottom: 0;
}

.search-api-key-list {
  font-family: "OpenAI Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: -0.14px;
  -webkit-font-smoothing: antialiased;
}

.search-api-key-heading {
  margin-bottom: 16px;
}

.search-api-key-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.search-api-key-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.search-api-new-key-btn {
  width: 36px;
  height: 36px;
  min-height: 0;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.search-api-new-key-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.search-api-new-key-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

.search-api-new-key-btn .ui-icon {
  width: 18px;
  height: 18px;
}

.search-api-key-list:empty {
  display: none;
}

.search-api-key-list .table-wrap {
  width: calc(100% + 28px);
  max-width: none;
  min-width: 0;
  margin: 4px -14px 0;
  padding-inline: 14px;
}

.search-api-key-list .api-keys-table {
  min-width: 720px;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}

.search-api-key-list .api-keys-table thead th {
  border-bottom: 0;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.13px;
  text-transform: none;
}

.search-api-key-list .api-keys-table td {
  padding-block: 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: -0.14px;
}

.search-api-key-list .api-keys-table .cell-mono {
  font-family: inherit;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.14px;
}

.search-api-key-list .api-key-value-cell .api-key-prefix {
  color: var(--text);
  font-weight: 400;
}

.search-api-key-list .created-date-cell {
  color: var(--text);
  font-family: inherit;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.search-api-key-list .api-keys-table td:first-child {
  color: var(--text);
  font-weight: 400;
}

.search-api-key-list .api-keys-table tbody tr:not(:last-child) td {
  border-bottom: 1px solid var(--border);
}

.search-api-key-list .api-keys-table tbody tr:last-child td {
  border-bottom: 0;
}

.search-api-key-list .api-keys-table tbody tr {
  background: transparent;
  transition: none;
}

.search-api-key-list .api-keys-table tbody td {
  transition: none;
}

.search-api-key-list .api-keys-table tbody tr:hover td,
.search-api-key-list .api-keys-table tbody tr:has(:focus-visible) td {
  background: var(--surface-hover);
  border-bottom-color: transparent;
}

.search-api-key-list .api-keys-table tbody tr:hover td:first-child,
.search-api-key-list .api-keys-table tbody tr:has(:focus-visible) td:first-child {
  position: relative;
  border-radius: 0;
}

.search-api-key-list .api-keys-table tbody tr:hover td:last-child,
.search-api-key-list .api-keys-table tbody tr:has(:focus-visible) td:last-child {
  position: relative;
  border-radius: 0;
}

.search-api-key-list .api-keys-table tbody tr:hover td:first-child::before,
.search-api-key-list .api-keys-table tbody tr:has(:focus-visible) td:first-child::before,
.search-api-key-list .api-keys-table tbody tr:hover td:last-child::after,
.search-api-key-list .api-keys-table tbody tr:has(:focus-visible) td:last-child::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  background: var(--surface-hover);
  pointer-events: none;
}

.search-api-key-list .api-keys-table tbody tr:hover td:first-child::before,
.search-api-key-list .api-keys-table tbody tr:has(:focus-visible) td:first-child::before {
  left: -14px;
  border-radius: 14px 0 0 14px;
}

.search-api-key-list .api-keys-table tbody tr:hover td:last-child::after,
.search-api-key-list .api-keys-table tbody tr:has(:focus-visible) td:last-child::after {
  right: -14px;
  border-radius: 0 14px 14px 0;
}

.search-api-key-list .api-keys-table .actions-column {
  width: 96px;
  min-width: 96px;
  padding-inline: 8px;
}

.search-api-key-list .action-icon-btn,
.search-api-key-list .inline-copy-btn,
html[data-theme="light"] .search-api-key-list .action-icon-btn,
html[data-theme="light"] .search-api-key-list .inline-copy-btn {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.search-api-key-list .action-icon-btn .ui-icon {
  width: 20px;
  height: 20px;
}

.search-api-key-list .action-icon-btn.danger,
html[data-theme="light"] .search-api-key-list .action-icon-btn.danger {
  color: var(--status-danger);
}

.search-api-key-list .action-icon-btn:hover,
.search-api-key-list .action-icon-btn:focus-visible,
.search-api-key-list .inline-copy-btn:hover,
.search-api-key-list .inline-copy-btn:focus-visible,
html[data-theme="light"] .search-api-key-list .action-icon-btn:hover,
html[data-theme="light"] .search-api-key-list .action-icon-btn:focus-visible,
html[data-theme="light"] .search-api-key-list .inline-copy-btn:hover,
html[data-theme="light"] .search-api-key-list .inline-copy-btn:focus-visible {
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
}

.search-api-key-list .action-icon-btn.danger:hover,
.search-api-key-list .action-icon-btn.danger:focus-visible {
  border: 0;
  background: transparent;
  color: var(--status-danger);
}

.search-api-key-list .action-icon-btn:focus-visible,
.search-api-key-list .inline-copy-btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.search-api-key-list .action-icon-btn.copied,
.search-api-key-list .inline-copy-btn.copied {
  border: 0;
  background: transparent;
  color: var(--green);
}

.search-api-key-list .empty-state {
  min-height: 128px;
  border: 0;
}

.modal-overlay.search-api-create-overlay,
.modal-overlay.search-api-rename-overlay,
.modal-overlay.search-api-issued-overlay,
.modal-overlay.search-api-delete-overlay {
  padding: 16px;
  background: rgba(0,0,0,0.72);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.search-api-create-overlay .modal.search-api-create-modal,
.search-api-rename-overlay .modal.search-api-rename-modal {
  width: min(460px, calc(100vw - 32px));
  max-width: 460px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #303030;
  box-shadow: 0 20px 60px rgba(0,0,0,0.42);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #f2f2f2;
  font-family: inherit;
  animation: searchApiDialogIn 0.16s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes searchApiDialogIn {
  from { opacity: 0; transform: translateY(4px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal.search-api-issued-modal {
  width: min(500px, calc(100vw - 32px));
  max-width: 500px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #303030;
  box-shadow: 0 20px 60px rgba(0,0,0,0.42);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #f2f2f2;
  font-family: inherit;
  animation: searchApiDialogIn 0.16s cubic-bezier(0.2, 0, 0, 1);
}

.modal.search-api-delete-modal {
  width: min(500px, calc(100vw - 32px));
  max-width: 500px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #303030;
  box-shadow: 0 20px 60px rgba(0,0,0,0.42);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #f2f2f2;
  font-family: inherit;
  animation: searchApiDialogIn 0.16s cubic-bezier(0.2, 0, 0, 1);
}

.search-api-create-overlay .search-api-create-modal .modal-header,
.search-api-rename-overlay .search-api-rename-modal .modal-header {
  display: block;
  padding: 22px 24px 12px;
  border-bottom: 0;
}

.search-api-issued-modal .modal-header {
  display: block;
  padding: 24px 24px 0;
  border-bottom: 0;
}

.search-api-delete-modal .modal-header {
  display: block;
  padding: 24px 24px 0;
  border-bottom: 0;
}

.search-api-create-overlay .search-api-create-modal .modal-title,
.search-api-rename-overlay .search-api-rename-modal .modal-title {
  color: #f2f2f2;
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  letter-spacing: normal;
}

.search-api-create-overlay .search-api-create-modal .modal-close,
.search-api-rename-overlay .search-api-rename-modal .modal-close {
  display: none !important;
}

.search-api-issued-modal .modal-title {
  color: #f2f2f2;
  font-size: 22px;
  font-weight: 600;
  line-height: 30px;
  letter-spacing: normal;
}

.search-api-delete-modal .modal-title {
  color: #f2f2f2;
  font-size: 22px;
  font-weight: 600;
  line-height: 30px;
  letter-spacing: normal;
}

.search-api-create-overlay .search-api-create-modal .modal-body,
.search-api-rename-overlay .search-api-rename-modal .modal-body {
  padding: 3px 24px 0;
}

.search-api-create-overlay .search-api-create-modal .form-group,
.search-api-rename-overlay .search-api-rename-modal .form-group {
  margin: 0;
}

.search-api-create-overlay .search-api-create-modal .form-label,
.search-api-rename-overlay .search-api-rename-modal .form-label {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 0 0 8px;
  color: #e8e8e8;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: normal;
  text-transform: none;
}

.search-api-create-optional {
  color: #b9b9b9;
  font-weight: 400;
  line-height: 20px;
}

.search-api-create-overlay .search-api-create-modal .input,
.search-api-rename-overlay .search-api-rename-modal .input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,0.32);
  border-radius: 10px;
  background: #303030;
  color: #f2f2f2;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: normal;
  color-scheme: dark;
}

.search-api-create-overlay .search-api-create-modal .input:hover,
.search-api-rename-overlay .search-api-rename-modal .input:hover {
  border-color: rgba(255,255,255,0.46);
}

.search-api-create-overlay .search-api-create-modal .input:focus,
.search-api-rename-overlay .search-api-rename-modal .input:focus {
  border-color: rgba(255,255,255,0.52);
  box-shadow: none;
  outline: none;
}

.search-api-rename-modal .search-api-rename-name {
  border-radius: 10px;
}

.search-api-create-overlay .search-api-create-status,
.search-api-rename-overlay .search-api-create-status {
  min-height: 0;
  margin: 8px 0 0;
  color: #b9b9b9;
  font-size: 12px;
  line-height: 18px;
}

.search-api-create-overlay .search-api-create-status:empty,
.search-api-rename-overlay .search-api-create-status:empty {
  display: none;
}

.search-api-create-overlay .search-api-create-status.error,
.search-api-rename-overlay .search-api-create-status.error {
  color: var(--status-danger);
}

.search-api-create-overlay .search-api-create-modal .modal-footer,
.search-api-rename-overlay .search-api-rename-modal .modal-footer {
  justify-content: flex-end;
  gap: 8px;
  padding: 24px 24px 22px;
  border-top: 0;
}

.search-api-create-overlay .search-api-create-modal .modal-footer .btn,
.search-api-rename-overlay .search-api-rename-modal .modal-footer .btn {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: normal;
  transform: none;
  box-shadow: none;
}

.search-api-create-overlay .search-api-create-modal .btn-secondary,
.search-api-rename-overlay .search-api-rename-modal .btn-secondary {
  background: #494949;
  color: #f2f2f2;
}

.search-api-create-overlay .search-api-create-modal .btn-secondary:hover:not(:disabled),
.search-api-create-overlay .search-api-create-modal .btn-secondary:focus-visible,
.search-api-rename-overlay .search-api-rename-modal .btn-secondary:hover:not(:disabled),
.search-api-rename-overlay .search-api-rename-modal .btn-secondary:focus-visible {
  border: 0;
  background: #555555;
  transform: none;
}

.search-api-create-overlay .search-api-create-modal .btn-primary,
.search-api-rename-overlay .search-api-rename-modal .btn-primary {
  background: #494949;
  color: #f2f2f2;
}

.search-api-create-overlay .search-api-create-modal .btn-primary:hover:not(:disabled),
.search-api-create-overlay .search-api-create-modal .btn-primary:focus-visible,
.search-api-rename-overlay .search-api-rename-modal .btn-primary:hover:not(:disabled),
.search-api-rename-overlay .search-api-rename-modal .btn-primary:focus-visible {
  background: #555555;
  color: #ffffff;
  opacity: 1;
  transform: none;
}

.search-api-create-overlay .search-api-create-modal .btn-primary:disabled,
.search-api-rename-overlay .search-api-rename-modal .btn-primary:disabled {
  background: #3b3b3b;
  color: #777777;
  opacity: 1;
}

.search-api-issued-modal .modal-body {
  padding: 16px 24px 0;
}

.search-api-issued-description {
  margin: 0;
  color: #e2e2e2;
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: normal;
}

.search-api-issued-key {
  min-width: 0;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 5px 5px 5px 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.32);
  border-radius: 10px;
  background: #303030;
}

.search-api-issued-copy {
  min-width: 88px;
  min-height: 44px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  background: #f2f2f2;
  color: #171717;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: normal;
}

.search-api-issued-copy .ui-icon {
  width: 19px;
  height: 19px;
}

.search-api-issued-copy:hover,
.search-api-issued-copy:focus-visible {
  background: #ffffff;
  color: #111111;
  outline: none;
}

.search-api-issued-copy.copied {
  background: #f2f2f2;
  color: #171717;
}

.search-api-issued-key-value {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: #f2f2f2;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 22px;
  text-overflow: ellipsis;
  user-select: all;
  white-space: nowrap;
}

.search-api-issued-permissions {
  margin-top: 28px;
}

.search-api-issued-permissions h3,
.search-api-issued-permissions p {
  margin: 0;
  letter-spacing: normal;
}

.search-api-issued-permissions h3 {
  color: #f2f2f2;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}

.search-api-issued-permissions p {
  margin-top: 8px;
  color: #e2e2e2;
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
}

.search-api-issued-modal .modal-footer {
  justify-content: flex-end;
  padding: 30px 24px 24px;
  border-top: 0;
}

.search-api-issued-modal .modal-footer .btn {
  min-width: 72px;
  min-height: 40px;
  justify-content: center;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: #494949;
  color: #f2f2f2;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: normal;
  text-align: center;
  box-shadow: none;
}

.search-api-issued-modal .modal-footer .btn:hover,
.search-api-issued-modal .modal-footer .btn:focus-visible {
  background: #555555;
  color: #ffffff;
  transform: none;
}

.search-api-delete-modal .modal-body {
  padding: 16px 24px 0;
}

.search-api-delete-description {
  margin: 0;
  color: #e2e2e2;
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: normal;
}

.search-api-delete-key {
  min-height: 56px;
  display: flex;
  align-items: center;
  margin-top: 24px;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  background: #303030;
  color: #f2f2f2;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-api-delete-modal .modal-footer {
  justify-content: flex-end;
  gap: 8px;
  padding: 30px 24px 24px;
  border-top: 0;
}

.search-api-delete-modal .modal-footer .btn {
  min-height: 40px;
  justify-content: center;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: normal;
  text-align: center;
  transform: none;
  box-shadow: none;
}

.search-api-delete-modal .btn-secondary {
  background: #494949;
  color: #f2f2f2;
}

.search-api-delete-modal .btn-secondary:hover,
.search-api-delete-modal .btn-secondary:focus-visible {
  background: #555555;
  color: #ffffff;
  transform: none;
}

.search-api-delete-modal .btn-danger {
  background: #e93636;
  color: #ffffff;
}

.search-api-delete-modal .btn-danger:hover,
.search-api-delete-modal .btn-danger:focus-visible {
  background: #f04444;
  color: #ffffff;
  transform: none;
}

html[data-theme="light"] .search-api-create-overlay .modal.search-api-create-modal,
html[data-theme="light"] .search-api-rename-overlay .modal.search-api-rename-modal,
html[data-theme="light"] .modal.search-api-issued-modal,
html[data-theme="light"] .modal.search-api-delete-modal {
  background: #303030;
  color: #f2f2f2;
  box-shadow: 0 20px 60px rgba(0,0,0,0.42);
}

html[data-theme="light"] .search-api-create-overlay .search-api-create-modal .input,
html[data-theme="light"] .search-api-rename-overlay .search-api-rename-modal .input {
  border-color: rgba(255,255,255,0.32);
  background: #303030;
  color: #f2f2f2;
}

html[data-theme="light"] .search-api-create-overlay .search-api-create-modal .input:hover,
html[data-theme="light"] .search-api-create-overlay .search-api-create-modal .input:focus,
html[data-theme="light"] .search-api-rename-overlay .search-api-rename-modal .input:hover,
html[data-theme="light"] .search-api-rename-overlay .search-api-rename-modal .input:focus {
  border-color: rgba(255,255,255,0.52);
}

html[data-theme="light"] .search-api-create-overlay .search-api-create-modal .btn-secondary,
html[data-theme="light"] .search-api-rename-overlay .search-api-rename-modal .btn-secondary {
  background: #494949;
  color: #f2f2f2;
}

html[data-theme="light"] .search-api-create-overlay .search-api-create-modal .btn-secondary:hover:not(:disabled),
html[data-theme="light"] .search-api-create-overlay .search-api-create-modal .btn-secondary:focus-visible,
html[data-theme="light"] .search-api-rename-overlay .search-api-rename-modal .btn-secondary:hover:not(:disabled),
html[data-theme="light"] .search-api-rename-overlay .search-api-rename-modal .btn-secondary:focus-visible {
  background: #555555;
}

html[data-theme="light"] .search-api-create-overlay .search-api-create-modal .btn-primary,
html[data-theme="light"] .search-api-rename-overlay .search-api-rename-modal .btn-primary {
  background: #494949;
  color: #f2f2f2;
}

html[data-theme="light"] .search-api-create-overlay .search-api-create-modal .btn-primary:hover:not(:disabled),
html[data-theme="light"] .search-api-create-overlay .search-api-create-modal .btn-primary:focus-visible,
html[data-theme="light"] .search-api-rename-overlay .search-api-rename-modal .btn-primary:hover:not(:disabled),
html[data-theme="light"] .search-api-rename-overlay .search-api-rename-modal .btn-primary:focus-visible {
  background: #555555;
}

html[data-theme="light"] .search-api-create-overlay .search-api-create-modal .btn-primary:disabled,
html[data-theme="light"] .search-api-rename-overlay .search-api-rename-modal .btn-primary:disabled {
  background: #3b3b3b;
  color: #777777;
}

html[data-theme="light"] .search-api-issued-key {
  border-color: rgba(255,255,255,0.32);
  background: #303030;
}

html[data-theme="light"] .search-api-delete-key {
  border-color: rgba(255,255,255,0.16);
  background: #303030;
}

html[data-theme="light"] .search-api-workbench,
html[data-theme="light"] .search-api-workbench-head,
html[data-theme="light"] .search-api-key-section,
html[data-theme="light"] .search-api-key-list {
  border-color: rgba(0,0,0,0.12);
}

html[data-theme="light"] .search-api-workbench {
  background: transparent;
}

html[data-theme="light"] .search-api-service-tab.active {
  background: var(--surface-2);
  color: var(--text);
}

html[data-theme="light"] .search-api-endpoint {
  border-color: rgba(0,0,0,0.12);
  background: transparent;
}

@media (max-width: 600px) {
  .service-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .search-api-key-heading-row {
    align-items: center;
  }

  .search-api-new-key-btn {
    width: 40px;
    height: 40px;
  }

  .search-api-endpoint > .inline-copy-btn {
    width: 44px;
    height: 44px;
  }

  .search-api-issued-modal .modal-footer .btn {
    min-height: 42px;
  }

  .search-api-create-overlay .search-api-create-modal .modal-header,
  .search-api-rename-overlay .search-api-rename-modal .modal-header {
    padding: 20px 20px 12px;
  }

  .search-api-create-overlay .search-api-create-modal .modal-title,
  .search-api-rename-overlay .search-api-rename-modal .modal-title {
    font-size: 18px;
    line-height: 26px;
  }

  .search-api-create-overlay .search-api-create-modal .modal-body,
  .search-api-rename-overlay .search-api-rename-modal .modal-body {
    padding: 3px 20px 0;
  }

  .search-api-create-overlay .search-api-create-modal .input,
  .search-api-rename-overlay .search-api-rename-modal .input {
    font-size: 16px;
  }

  .search-api-create-overlay .search-api-create-modal .modal-footer,
  .search-api-rename-overlay .search-api-rename-modal .modal-footer {
    padding: 22px 20px 20px;
  }

  .search-api-create-overlay .search-api-create-modal .modal-footer .btn,
  .search-api-rename-overlay .search-api-rename-modal .modal-footer .btn {
    min-height: 40px;
  }

  .search-api-issued-modal .modal-header {
    padding: 22px 20px 0;
  }

  .search-api-issued-modal .modal-title {
    font-size: 20px;
    line-height: 28px;
  }

  .search-api-issued-modal .modal-body {
    padding: 14px 20px 0;
  }

  .search-api-issued-modal .modal-footer {
    padding: 26px 20px 20px;
  }

  .search-api-delete-modal .modal-header {
    padding: 22px 20px 0;
  }

  .search-api-delete-modal .modal-title {
    font-size: 20px;
    line-height: 28px;
  }

  .search-api-delete-modal .modal-body {
    padding: 14px 20px 0;
  }

  .search-api-delete-modal .modal-footer {
    padding: 26px 20px 20px;
  }

  .search-api-delete-modal .modal-footer .btn {
    min-height: 42px;
  }

  .search-api-key-list .api-keys-table {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
  }

  .search-api-key-list .api-keys-table th,
  .search-api-key-list .api-keys-table td {
    min-width: 0;
    padding-inline: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .search-api-key-list .api-keys-table th:nth-child(3),
  .search-api-key-list .api-keys-table td:nth-child(3),
  .search-api-key-list .api-keys-table th:nth-child(4),
  .search-api-key-list .api-keys-table td:nth-child(4) {
    display: none;
  }

  .search-api-key-list .api-keys-table th:first-child {
    width: 27%;
  }

  .search-api-key-list .api-keys-table .actions-column {
    width: 76px;
    min-width: 76px;
    padding-inline: 4px;
  }

  .search-api-key-list .table-actions {
    gap: 4px;
  }

  .search-api-key-list .action-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
}

/* Minimal service dashboard */
.services-hub.service-apps-directory {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 18px 0 42px;
  display: block;
}

.service-apps-directory .service-app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
}

.service-apps-directory .service-app-card {
  min-width: 0;
  min-height: 76px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  overflow: visible;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 11px 10px;
  color: inherit;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}

.service-apps-directory .service-app-card:hover,
.service-apps-directory .service-app-card:focus-visible {
  background: rgba(255,255,255,0.055);
  transform: none;
  outline: none;
}

.service-apps-directory .service-app-icon {
  --service-icon-bg: #F1F1F2;
  --service-icon-fg: #171717;
  --service-icon-border: rgba(0,0,0,0.09);
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: var(--service-icon-fg);
  background: var(--service-icon-bg);
  border: 1px solid var(--service-icon-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.34);
}

.service-apps-directory .service-app-icon .brand-logo,
.service-apps-directory .service-app-icon .brand-logo-img,
.service-apps-directory .service-app-icon .theme-logo-mask,
.service-apps-directory .service-app-icon .theme-logo-image,
.service-apps-directory .service-app-icon .ui-icon {
  width: 25px;
  height: 25px;
}

.service-apps-directory .service-app-icon .brand-logo-img {
  max-width: 27px;
  max-height: 27px;
}

.service-apps-directory .service-app-icon.gitlab .gitlab-color-logo {
  width: 36px;
  height: 36px;
  max-width: 36px;
  max-height: 36px;
}

.service-apps-directory .service-app-icon .theme-logo-image {
  background-color: currentColor;
  background-image: none !important;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.service-apps-directory .service-app-icon.immich .immich-logo {
  mask-image: url("/static/immich-logo-white.svg?v=20260709-hermes-openwebui-model-routing-v1");
  -webkit-mask-image: url("/static/immich-logo-white.svg?v=20260709-hermes-openwebui-model-routing-v1");
}

.service-apps-directory .service-app-icon.plex .plex-logo {
  mask-image: url("/static/plex-logo-white.svg?v=20260709-hermes-openwebui-model-routing-v1");
  -webkit-mask-image: url("/static/plex-logo-white.svg?v=20260709-hermes-openwebui-model-routing-v1");
}

.service-apps-directory .service-app-icon.new-api {
  --service-icon-bg: #DDF8E8;
  --service-icon-fg: #176B45;
}
.service-apps-directory .service-app-icon.search-api,
.service-apps-directory .service-app-icon.jiminbox-portal {
  --service-icon-bg: #E0F3FF;
  --service-icon-fg: #16658E;
}
.service-apps-directory .service-app-icon.hermes {
  --service-icon-bg: #E9EEFF;
  --service-icon-fg: #314DA8;
}
.service-apps-directory .service-app-icon.risu {
  --service-icon-bg: #3978FF;
  --service-icon-fg: #FFFFFF;
  --service-icon-border: rgba(255,255,255,0.30);
}
.service-apps-directory .service-app-icon.fns {
  --service-icon-bg: #F0E9FF;
  --service-icon-fg: #6942A9;
}
.service-apps-directory .service-app-icon.opencloud {
  --service-icon-bg: #DDF8F5;
  --service-icon-fg: var(--brand-cloud-icon);
}
.service-apps-directory .service-app-icon.immich {
  --service-icon-bg: #EEE8FF;
  --service-icon-fg: #6542B8;
}
.service-apps-directory .service-app-icon.vpn {
  --service-icon-bg: #FFE8F0;
  --service-icon-fg: #AE315E;
}
.service-apps-directory .service-app-icon.gitlab {
  --service-icon-bg: #FFE8DC;
  --service-icon-fg: #B45128;
}
.service-apps-directory .service-app-icon.plex {
  --service-icon-bg: #FFF3C9;
  --service-icon-fg: #986C08;
}
.service-apps-directory .service-app-icon.roon {
  --service-icon-bg: #F7F7F8;
  --service-icon-fg: #222222;
}
.service-apps-directory .service-app-icon.claude-web-search,
.service-apps-directory .service-app-icon.claude {
  --service-icon-bg: #FFE9DD;
  --service-icon-fg: #A55832;
}
.service-apps-directory .service-app-icon.firecrawl {
  --service-icon-bg: #FFF0E8;
  --service-icon-fg: #C3521C;
}

.service-apps-directory .service-app-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.service-apps-directory .service-app-copy strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 680;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-apps-directory .service-app-copy small {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.42;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

html[data-theme="light"] .service-apps-directory .service-app-card:hover,
html[data-theme="light"] .service-apps-directory .service-app-card:focus-visible {
  background: rgba(0,0,0,0.055);
}

html[data-theme="light"] .service-apps-directory .service-app-icon {
  border-color: var(--service-icon-border);
}


@media (max-width: 760px) {
  .service-apps-directory .service-app-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .services-hub.service-apps-directory {
    padding-top: 8px;
  }

  .service-apps-directory .service-app-card {
    grid-template-columns: 44px minmax(0, 1fr);
    min-height: 68px;
    padding: 10px 6px;
  }

  .service-apps-directory .service-app-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

}

/* === Settings Modal (desktop settings style) === */
.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px) saturate(1.12);
  z-index: 500;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.settings-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.settings-modal {
  width: min(900px, calc(100vw - 32px));
  height: min(630px, calc(100dvh - 48px));
  max-height: 86vh;
  background: #0b0b0c;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 24px;
  box-shadow: 0 32px 110px rgba(0, 0, 0, 0.68);
  transform: translateY(14px) scale(0.975);
  transition: transform 180ms ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.settings-overlay.open .settings-modal {
  transform: translateY(0) scale(1);
}

.settings-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
  backdrop-filter: blur(10px);
}

.settings-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.settings-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
}

.settings-sidebar {
  padding: 20px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.075);
  background: #080809;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.settings-nav-item {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 560;
  text-align: left;
  transition: background var(--transition), color var(--transition);
}

.settings-nav-item:hover {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.settings-nav-item.active {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text);
}

.settings-nav-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.settings-nav-icon .ui-icon {
  width: 17px;
  height: 17px;
}

.settings-panel {
  min-width: 0;
  overflow-y: auto;
  padding: 34px 38px 38px;
  background: #0f0f10;
}

.settings-tab-pane {
  display: none;
  animation: settingsPaneIn 140ms ease;
}

.settings-tab-pane.active {
  display: block;
}

@keyframes settingsPaneIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.settings-pane-header {
  margin-bottom: 18px;
}

.settings-pane-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: -0.045em;
  font-weight: 760;
}

.settings-pane-header p {
  margin: 7px 0 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.55;
}

.settings-list-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.settings-line {
  min-height: 64px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  background: transparent;
  color: var(--text);
  width: 100%;
  font: inherit;
  text-align: left;
}

.logout-form {
  width: 100%;
}

.settings-line:last-child,
.settings-list-card form:last-child .settings-line {
  border-bottom: none;
}

.settings-line-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.settings-line-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.065);
  flex-shrink: 0;
}

.settings-line-icon .ui-icon {
  width: 18px;
  height: 18px;
}

.settings-line-icon.danger {
  color: #ff5f57;
  background: rgba(255, 95, 87, 0.13);
}

.settings-line strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 630;
  line-height: 1.25;
}

.settings-line small {
  display: block;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.35;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
}


.subscription-plan-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(135deg, rgba(255,255,255,0.09), rgba(255,255,255,0.035));
}

.subscription-plan-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #f5f5f7;
  background: rgba(255,255,255,0.10);
}

.subscription-plan-icon .ui-icon {
  width: 21px;
  height: 21px;
}

.subscription-plan-icon .simple-key-icon {
  width: 24px;
  height: 24px;
}

.subscription-plan-main {
  min-width: 0;
}

.subscription-plan-eyebrow {
  display: block;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.subscription-plan-title {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.subscription-plan-title strong {
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  font-weight: 780;
  letter-spacing: -0.06em;
}

.subscription-plan-title span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: #050505;
  background: #f5f5f7;
  font-size: 11px;
  font-weight: 760;
}

.subscription-plan-card p {
  margin: 10px 0 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.48;
}

.subscription-detail-card {
  margin-top: 0;
}

.onboarding-status-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.onboarding-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #8e8e93;
  box-shadow: 0 0 0 5px rgba(142, 142, 147, 0.12);
}

.onboarding-status-card[data-status="ready"] .onboarding-status-dot,
.onboarding-status-card[data-status="READY"] .onboarding-status-dot {
  background: #32d74b;
  box-shadow: 0 0 0 5px rgba(50, 215, 75, 0.12);
}

.onboarding-status-card[data-status="pending"] .onboarding-status-dot,
.onboarding-status-card[data-status="provisioning"] .onboarding-status-dot,
.onboarding-status-card[data-status="VALIDATING_NEW_API_KEY"] .onboarding-status-dot,
.onboarding-status-card[data-status="PROVISIONING_FIRECRAWL"] .onboarding-status-dot,
.onboarding-status-card[data-status="DEPLOYING_RISUAI"] .onboarding-status-dot,
.onboarding-status-card[data-status="DEPLOYING_HERMES"] .onboarding-status-dot,
.onboarding-status-card[data-status="VERIFYING"] .onboarding-status-dot {
  background: #ffd60a;
  box-shadow: 0 0 0 5px rgba(255, 214, 10, 0.12);
}

.onboarding-status-card[data-status="failed"] .onboarding-status-dot,
.onboarding-status-card[data-status="FAILED_RETRYABLE"] .onboarding-status-dot {
  background: #ff453a;
  box-shadow: 0 0 0 5px rgba(255, 69, 58, 0.12);
}

.onboarding-status-copy {
  min-width: 0;
}

.onboarding-status-copy strong,
.onboarding-status-copy small {
  display: block;
}

.onboarding-status-copy strong {
  color: var(--text);
  font-size: 13px;
}

.onboarding-status-copy small {
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

@media (max-width: 620px) {
  .onboarding-status-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .onboarding-status-card .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}


.theme-segment {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.theme-segment-option {
  height: 28px;
  min-width: 58px;
  padding: 0 12px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.theme-segment-option.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
}

.settings-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.theme-preview-card {
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  padding: 14px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

.theme-preview-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-light);
}

.theme-preview-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.theme-preview {
  height: 82px;
  border-radius: 13px;
  display: grid;
  grid-template-columns: 0.42fr 1fr;
  gap: 8px;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.12);
}

.theme-preview.dark {
  background: #050505;
}

.theme-preview.light {
  background: #f6f6f3;
  border-color: rgba(0,0,0,0.12);
}

.theme-preview i {
  display: block;
  border-radius: 8px;
  background: rgba(255,255,255,0.16);
}

.theme-preview i:first-child {
  grid-row: span 3;
}

.theme-preview.light i {
  background: rgba(0,0,0,0.13);
}

.theme-preview-card strong,
.theme-preview-card small {
  display: block;
}

.theme-preview-card strong {
  font-size: 14px;
  font-weight: 650;
}

.theme-preview-card small {
  color: var(--text-dim);
  font-size: 12px;
  margin-top: 3px;
}


.settings-danger-line {
  cursor: pointer;
}

.settings-danger-line:hover {
  background: rgba(255, 95, 87, 0.08);
}

.settings-danger-line strong {
  color: #ff5f57;
}

html[data-theme="light"] .settings-overlay {
  background: rgba(0, 0, 0, 0.38);
}

html[data-theme="light"] .settings-modal {
  background: #ffffff;
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 32px 90px rgba(0,0,0,0.24);
}

html[data-theme="light"] .settings-sidebar,
html[data-theme="light"] .settings-line,
html[data-theme="light"] .settings-list-card,
html[data-theme="light"] .theme-preview-card {
  border-color: rgba(0,0,0,0.10);
}

html[data-theme="light"] .settings-sidebar {
  background: #f4f4f1;
}

html[data-theme="light"] .settings-panel {
  background: #ffffff;
}

html[data-theme="light"] .settings-close {
  background: rgba(0,0,0,0.055);
}

html[data-theme="light"] .settings-close:hover {
  background: rgba(0,0,0,0.09);
}

html[data-theme="light"] .settings-list-card,
html[data-theme="light"] .theme-preview-card {
  background: rgba(0,0,0,0.025);
}

html[data-theme="light"] .subscription-plan-card {
  background: linear-gradient(135deg, rgba(0,0,0,0.055), rgba(0,0,0,0.018));
  border-color: rgba(0,0,0,0.10);
}

html[data-theme="light"] .subscription-plan-icon {
  color: #151515;
  background: rgba(0,0,0,0.055);
}

html[data-theme="light"] .subscription-plan-title span {
  color: #f8f8f5;
  background: #151515;
}

html[data-theme="light"] .settings-nav-item:hover {
  background: rgba(0,0,0,0.055);
}

html[data-theme="light"] .settings-nav-item.active,
html[data-theme="light"] .theme-segment-option.active {
  background: rgba(0,0,0,0.08);
}

html[data-theme="light"] .settings-line-icon,
html[data-theme="light"] .theme-segment {
  background: rgba(0,0,0,0.045);
  border-color: rgba(0,0,0,0.08);
}

@media (max-width: 720px) {
  .settings-modal {
    width: calc(100vw - 20px);
    height: min(720px, calc(100dvh - 24px));
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.09);
    flex-direction: row;
    overflow-x: auto;
    padding: 10px;
  }

  .settings-nav-item {
    min-width: max-content;
    width: auto;
    padding: 0 12px;
  }

  .settings-panel {
    padding: 20px;
  }

  .settings-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .theme-segment {
    width: 100%;
  }

  .theme-segment-option {
    flex: 1;
  }

  .settings-preview-grid {
    grid-template-columns: 1fr;
  }
}


/* === Roon === */
.roon-page {
  max-width: 1180px;
}

.roon-overview {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 0 28px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.roon-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 18px;
  margin-bottom: 18px;
}

.roon-submit-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.roon-health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.roon-health-grid > div {
  min-width: 0;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.045);
  border: 1px solid var(--border);
}

.roon-health-grid span {
  display: block;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.roon-health-grid strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 680;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.minimal-service-logo.roon {
  color: var(--text-dim);
}

@media (max-width: 900px) {
  .roon-overview {
    align-items: flex-start;
    flex-direction: column;
  }

  .roon-grid,
  .roon-health-grid {
    grid-template-columns: 1fr;
  }
}


.roon-log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roon-log-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.roon-log-row:last-child {
  border-bottom: 0;
}

.roon-log-main {
  min-width: 0;
}

.roon-log-main strong,
.roon-log-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roon-log-main strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.roon-log-main small,
.roon-log-row time {
  color: var(--text-dim);
  font-size: 11px;
}

.empty-state.compact {
  padding: 22px 12px;
}


/* Official Roon logo mark */
.roon-logo {
  display: block;
  width: 1em;
  height: 1em;
  object-fit: contain;
  flex: 0 0 auto;
}

.nav-icon .roon-logo,
.card-title-icon .roon-logo {
  width: 18px;
  height: 18px;
}

.stat-icon .roon-logo {
  width: 17px;
  height: 17px;
}

.minimal-service-logo.roon .roon-logo {
  width: 24px;
  height: 24px;
}

.empty-icon .roon-logo {
  width: 34px;
  height: 34px;
}

.roon-overview-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.roon-overview-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.roon-overview-logo .roon-logo {
  width: 18px;
  height: 18px;
}

/* Roon fast-loading states */
.alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.alert-error {
  border-color: rgba(255, 84, 84, 0.28);
  background: rgba(255, 84, 84, 0.09);
  color: #ffb8b8;
}

.roon-skeleton-number {
  display: inline-block;
  width: 72px;
  height: 38px;
  margin: 0;
  border-radius: 10px;
  vertical-align: middle;
}

html[data-theme="light"] .alert-error {
  background: rgba(180, 38, 38, 0.08);
  border-color: rgba(180, 38, 38, 0.22);
  color: #8d1f1f;
}


/* === Jiminbox home/profile/login refresh === */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.user-avatar.has-image,
.profile-editor-avatar.has-image {
  padding: 0;
  overflow: hidden;
  background: var(--surface-2);
}

.user-avatar img,
.profile-editor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.jiminbox-home {
  width: min(100%, 760px);
  max-width: 760px;
  margin-inline: auto;
  padding-top: clamp(8px, 3vh, 28px);
}

.home-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 14px 0 34px;
  margin-bottom: 26px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}

.home-hero-copy {
  width: 100%;
}

.home-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(48px, 8vw, 92px);
  line-height: 0.9;
  font-weight: 790;
  letter-spacing: -0.08em;
}

.home-caption {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 14px;
}


.login-page-v2 {
  align-items: stretch;
  justify-content: center;
  padding: clamp(24px, 6vw, 72px);
  background: #000000;
}

.login-panel {
  width: min(100%, 920px);
  min-height: min(720px, calc(100vh - 96px));
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 6vw, 72px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: clamp(28px, 5vw, 46px);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.014)),
    #000000;
  box-shadow: 0 36px 110px rgba(0,0,0,0.42);
}

.login-kicker {
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.login-page-v2 .login-title {
  text-align: left;
  max-width: 760px;
  margin: 0;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.08em;
  font-weight: 790;
}

.login-page-v2 .login-subtitle {
  text-align: left;
  max-width: 520px;
  margin: 22px 0 28px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.65;
}

.login-page-v2 .login-btn {
  width: auto;
  align-self: flex-start;
  min-width: 160px;
  height: 44px;
  padding-inline: 20px;
}

.login-service-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.login-service-strip span {
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
  border-radius: 999px;
  padding: 7px 10px;
}

html[data-theme="light"] .home-hero,
html[data-theme="light"] .minimal-service-row {
  border-color: rgba(0,0,0,0.12);
}

html[data-theme="light"] .login-panel {
  background: rgba(255,255,255,0.72);
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 24px 70px rgba(35,35,30,0.10);
}


html[data-theme="light"] .login-page-v2 {
  background:
    radial-gradient(circle at 50% 10%, rgba(0,0,0,0.045), transparent 34%),
    linear-gradient(180deg, #f8f8f4, #e9e9e4);
}

html[data-theme="light"] .login-service-strip span {
  color: #55555b;
  background: rgba(0,0,0,0.045);
  border-color: rgba(0,0,0,0.10);
}

@media (max-width: 760px) {
  .home-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .login-panel {
    min-height: calc(100vh - 48px);
  }
}



.profile-editor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 22px;
  margin-bottom: 14px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.032);
}

.profile-avatar-btn {
  position: relative;
  width: 96px;
  height: 96px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  font: inherit;
}

.profile-editor-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 32px;
  font-weight: 780;
  overflow: hidden;
}

.profile-editor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-action {
  position: absolute;
  right: -1px;
  bottom: 3px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #2d2d2f;
  border: 2px solid #202123;
  box-shadow: 0 2px 8px rgba(0,0,0,0.28);
  pointer-events: none;
}

.profile-avatar-action .ui-icon {
  width: 16px;
  height: 16px;
}

.profile-avatar-btn:focus-visible {
  outline: 2px solid var(--border-light);
  outline-offset: 4px;
}

.profile-editor-meta {
  text-align: center;
  min-width: 0;
  max-width: 100%;
}

.profile-editor-meta strong,
.profile-editor-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-editor-meta strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.profile-editor-meta small {
  margin-top: 2px;
  color: var(--text-dim);
  font-size: 12px;
}

.profile-remove-btn {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 999px;
  transition: background var(--transition), color var(--transition);
}

.profile-remove-btn:hover,
.profile-remove-btn:focus-visible {
  color: var(--text);
  background: var(--surface-hover);
  outline: none;
}

.jiminbox-home .home-hero {
  justify-content: center;
}

html[data-theme="light"] .profile-editor {
  background: rgba(255,255,255,0.70);
  border-color: rgba(0,0,0,0.12);
}

html[data-theme="light"] .profile-avatar-action {
  border-color: #ffffff;
}


/* === Embedded Hermes Agent === */
.main-area.route-hermes,
.main-area.route-chat {
  background: #000000;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.content-area.route-hermes,
.content-area.route-chat {
  padding: 0;
  max-width: none;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.hermes-page {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  background: #000000;
  color: var(--text);
}

.hermes-page.hermes-chat-only {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  --hermes-chat-start-offset: 56px;
  --hermes-guard-top: 0px;
}

.hermes-page.hermes-chat-only .hermes-chat-shell {
  grid-template-rows: minmax(0, 1fr);
  --hermes-guard-top: 0px;
}

.hermes-session-panel {
  min-width: 0;
  border-right: 1px solid rgba(255,255,255,0.075);
  background: #000000;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hermes-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hermes-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hermes-panel-head h2 {
  font-size: 21px;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.hermes-new-btn,
.hermes-refresh-btn,
:is(.hermes-send-btn) {
  border: 1px solid rgba(255,255,255,0.11);
  background: rgba(255,255,255,0.055);
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), opacity var(--transition);
}

.hermes-new-btn {
  width: 34px;
  height: 34px;
  font-size: 22px;
  line-height: 1;
}

.hermes-refresh-btn {
  height: 34px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 650;
}

.hermes-new-btn:hover,
.hermes-refresh-btn:hover,
.hermes-send-btn:not(:disabled):hover {
  background: rgba(255,255,255,0.11);
  border-color: rgba(255,255,255,0.18);
}

.hermes-new-btn:disabled,
.hermes-refresh-btn:disabled,
.hermes-send-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hermes-status-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 9px 11px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.075);
  background: rgba(255,255,255,0.035);
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.25;
}

.hermes-live-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #f5f5f7;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.08);
}

#hermes-status-line[data-tone="error"] { color: #ffb4b4; }
#hermes-status-line[data-tone="ok"] { color: #e5e5ea; }

.hermes-session-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.hermes-session-item {
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text-dim);
  text-align: left;
  padding: 11px 12px;
  margin-bottom: 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background var(--transition), color var(--transition);
}

.hermes-session-item:hover,
.hermes-session-item.active {
  background: rgba(255,255,255,0.075);
  color: var(--text);
}

.hermes-session-title {
  font-size: 13px;
  font-weight: 650;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hermes-session-meta,
.hermes-empty-list {
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.35;
}

.hermes-empty-list {
  padding: 18px 10px;
}

.hermes-dashboard-link {
  color: var(--text-dim);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.075);
  font-size: 12px;
  font-weight: 620;
}

.hermes-dashboard-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.055);
}

.hermes-chat-shell {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  background: #000000;
  overflow: hidden;
  --hermes-tool-sidebar-w: 340px;
  --hermes-scroll-guard-h: 0px;
  --hermes-guard-top: 0px;
  --hermes-composer-bottom: max(38px, env(safe-area-inset-bottom));
  --hermes-composer-current-h: 54px;
  --hermes-composer-shift: 0px;
  --hermes-messages-scrollbar-w: 12px;
  --hermes-composer-occlusion-h: calc(var(--hermes-composer-bottom) + 82px);
  --hermes-composer-clip-h: calc(var(--hermes-composer-bottom) + 27px);
  --hermes-stream-scroll-trigger-h: 81px;
  --hermes-last-response-drop: 40px;
  --hermes-scroll-bottom-gap: calc(var(--hermes-composer-occlusion-h) + var(--hermes-stream-scroll-trigger-h) - var(--hermes-last-response-drop));
  --hermes-rail-max: var(--hermes-content-max);
  --hermes-rail-side-room: clamp(32px, 10vw, 120px);
  --hermes-rail-width: min(var(--hermes-rail-max), calc(100% - var(--hermes-rail-side-room)));
}

.hermes-scroll-guard {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--hermes-guard-top, 64px);
  height: var(--hermes-scroll-guard-h);
  z-index: 24;
  pointer-events: none;
  background: #000000;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.hermes-scroll-guard.visible {
  border-bottom-color: rgba(255,255,255,0.028);
  box-shadow: 0 10px 28px rgba(0,0,0,0.20);
}

.hermes-page:not(.hermes-chat-only) .hermes-scroll-guard {
  display: none;
}

.hermes-messages {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overflow-anchor: none;
  scrollbar-gutter: stable;
  /* Hide transcript content at the composer's midpoint while keeping the
     browser scrollbar visible through the lower occlusion area. */
  -webkit-clip-path: polygon(
    0 0,
    100% 0,
    100% 100%,
    calc(100% - var(--hermes-messages-scrollbar-w, 12px)) 100%,
    calc(100% - var(--hermes-messages-scrollbar-w, 12px)) calc(100% - var(--hermes-composer-clip-h)),
    0 calc(100% - var(--hermes-composer-clip-h))
  );
  clip-path: polygon(
    0 0,
    100% 0,
    100% 100%,
    calc(100% - var(--hermes-messages-scrollbar-w, 12px)) 100%,
    calc(100% - var(--hermes-messages-scrollbar-w, 12px)) calc(100% - var(--hermes-composer-clip-h)),
    0 calc(100% - var(--hermes-composer-clip-h))
  );
  padding: var(--hermes-chat-start-offset, 10px) max(32px, calc((100% - var(--hermes-rail-width)) / 2)) var(--hermes-scroll-bottom-gap);
  scroll-padding-top: calc(var(--hermes-scroll-guard-h) + 14px);
  scroll-padding-bottom: var(--hermes-scroll-bottom-gap);
  display: flex;
  flex-direction: column;
  gap: var(--hermes-message-gap);
  background: #000000;
}

/* Session history is inserted before its saved scroll offset can be applied.
   Keep that intermediate frame out of view and reveal it immediately after
   the final offset is set; no visual transition is intentional here. */
.hermes-messages.is-restoring-scroll {
  visibility: hidden;
}

.hermes-scroll-bottom-btn {
  position: absolute;
  left: 50%;
  bottom: var(--hermes-composer-occlusion-h);
  z-index: 34;
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 50%;
  background: rgba(33,33,33,0.74);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.34);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(calc(-50% + var(--hermes-composer-shift, 0px))) translateY(8px) scale(0.96);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 220ms, background 160ms ease, border-color 160ms ease;
}

.hermes-scroll-bottom-btn.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(calc(-50% + var(--hermes-composer-shift, 0px))) translateY(0) scale(1);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0s, background 160ms ease, border-color 160ms ease;
}

.hermes-scroll-bottom-btn:hover,
.hermes-scroll-bottom-btn:focus-visible {
  background: #2b2b2b;
  border-color: rgba(255,255,255,0.24);
  outline: none;
}

.hermes-scroll-bottom-btn .ui-icon {
  width: 18px;
  height: 18px;
}

.hermes-prompt-navigator {
  position: absolute;
  right: 13px;
  top: 50%;
  z-index: 33;
  transform: translateY(-50%);
}

.hermes-prompt-navigator[hidden] {
  display: none;
}

.hermes-prompt-navigator::before {
  content: "";
  position: absolute;
  top: 0;
  right: 100%;
  bottom: 0;
  width: 10px;
}

.hermes-prompt-navigator-rail {
  width: 32px;
  padding: 9px 5px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.hermes-prompt-marker {
  width: 22px;
  height: 3px;
  min-height: 3px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
  cursor: pointer;
  transition: width 150ms ease, background 150ms ease;
}

.hermes-prompt-marker:hover,
.hermes-prompt-marker:focus-visible,
.hermes-prompt-marker.is-active {
  width: 26px;
  background: rgba(255,255,255,0.72);
  outline: none;
}

.hermes-prompt-navigator-popover {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  width: min(340px, calc(100vw - 90px));
  padding: 7px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 15px;
  background: #303030;
  box-shadow: 0 14px 40px rgba(0,0,0,0.42);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(8px, -50%);
  transition: opacity 150ms ease, transform 180ms cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 180ms;
}

.hermes-prompt-navigator-list {
  max-height: min(416px, calc(100dvh - 184px));
  margin-right: -7px;
  padding-right: 7px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.hermes-prompt-navigator:hover .hermes-prompt-navigator-popover,
.hermes-prompt-navigator:focus-within .hermes-prompt-navigator-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(0, -50%);
  transition-delay: 0s;
}

.hermes-prompt-navigator-item {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  display: block;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #d1d1d1;
  text-align: left;
  font: inherit;
  font-size: 15px;
  line-height: 1.35;
  cursor: pointer;
}

.hermes-prompt-navigator-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hermes-prompt-navigator-item:hover,
.hermes-prompt-navigator-item:focus-visible {
  background: rgba(255,255,255,0.11);
  color: #ffffff;
  outline: none;
}

.hermes-prompt-navigator-item.is-active {
  color: #ffffff;
}

.hermes-message {
  width: min(var(--hermes-rail-max), 100%);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hermes-message.user + .hermes-message.assistant,
.hermes-message.user + .hermes-message.tool {
  margin-top: 38px;
}

.hermes-message.assistant + .hermes-message.user,
.hermes-message.tool + .hermes-message.user {
  margin-top: var(--hermes-turn-boundary-gap);
}

.hermes-message.tool + .hermes-message.tool,
.hermes-message.tool.compact {
  margin-top: calc(var(--hermes-tool-gap) - var(--hermes-message-gap));
}

.hermes-message.user {
  align-self: flex-end;
  align-items: flex-end;
}

.hermes-message.assistant,
.hermes-message.tool {
  align-self: flex-start;
  align-items: flex-start;
}

.hermes-message-label {
  padding: 0 4px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 650;
}

.hermes-message.user .hermes-message-label,
.hermes-message.assistant .hermes-message-label,
.hermes-message.tool .hermes-message-label {
  display: none;
}

.hermes-message-bubble {
  min-width: 0;
  max-width: 100%;
  border-radius: 0;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  line-height: 1.74;
  white-space: normal;
  overflow-wrap: anywhere;
}

.hermes-message.assistant .hermes-message-bubble {
  width: 100%;
}

.hermes-message-actions {
  min-height: 32px;
  margin-top: 1px;
  padding: 0 2px;
  display: flex;
  align-items: center;
  gap: 1px;
  color: var(--text-faint);
  -webkit-mask-image: linear-gradient(to right, #000 33%, transparent 66%);
  mask-image: linear-gradient(to right, #000 33%, transparent 66%);
  -webkit-mask-size: 300% 100%;
  mask-size: 300% 100%;
  -webkit-mask-position: 100% 0;
  mask-position: 100% 0;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  pointer-events: none;
  transition:
    -webkit-mask-position 1.5s cubic-bezier(0.4, 0, 0.2, 1),
    mask-position 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: -webkit-mask-position, mask-position;
}

.hermes-message-actions.is-visible {
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
  pointer-events: auto;
}

.hermes-message.assistant:hover > .hermes-message-actions,
.hermes-message.assistant:focus-within > .hermes-message-actions {
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
  pointer-events: auto;
  transition: none;
}

.hermes-response-action {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
  color: var(--text-faint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: none;
  transition: color 120ms ease, background-color 120ms ease;
}

.hermes-response-action.action-icon-btn {
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.hermes-response-action:hover,
.hermes-response-action:focus-visible,
.hermes-response-action.action-icon-btn:hover,
.hermes-response-action.action-icon-btn:focus-visible {
  border: 0;
  background: rgba(255,255,255,0.075);
  color: var(--text);
  outline: none;
  transform: none;
}

.hermes-response-action:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22);
}

.hermes-response-action.copied,
.hermes-response-action.action-icon-btn.copied {
  border: 0;
  background: transparent;
  color: var(--text);
  transform: none;
}

.hermes-response-action .ui-icon,
.hermes-response-action.action-icon-btn .ui-icon {
  width: 18px;
  height: 18px;
}

.hermes-response-copy,
.hermes-response-branch {
  border-radius: 8px;
  color: #cdcdcd;
}

.hermes-response-action.hermes-response-copy .response-copy-icon,
.hermes-response-copy.copied .ui-icon,
.hermes-response-action.hermes-response-branch .response-branch-icon {
  width: 20px;
  height: 20px;
}

@media (hover: none), (pointer: coarse) {
  .hermes-message-actions {
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hermes-message-actions {
    -webkit-mask-position: 0 0;
    mask-position: 0 0;
    pointer-events: auto;
    transition: none;
    will-change: auto;
  }
}

.hermes-response-copy:hover,
.hermes-response-copy:focus-visible,
.hermes-response-copy.action-icon-btn:hover,
.hermes-response-copy.action-icon-btn:focus-visible,
.hermes-response-branch:hover,
.hermes-response-branch:focus-visible,
.hermes-response-branch.action-icon-btn:hover,
.hermes-response-branch.action-icon-btn:focus-visible {
  background: rgba(255,255,255,0.15);
  color: #cdcdcd;
}

.hermes-response-branch:disabled {
  opacity: 0.4;
  cursor: default;
}

.hermes-message.user .hermes-message-bubble {
  max-width: min(var(--hermes-user-bubble-max), 100%);
  border-radius: 18px;
  padding: 8px 12px;
  background: #2a2a2c;
  border: 0;
  color: #f5f5f7;
  font-size: 16px;
  line-height: 1.55;
}

.hermes-message-task-mode {
  min-height: 18px;
  margin: 0 8px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8dbdff;
  font-size: 15px;
  font-weight: 600;
  line-height: inherit;
  vertical-align: middle;
}

.hermes-message-task-mode > span:first-child,
.hermes-message-task-mode .ui-icon,
.hermes-message-task-mode .brand-logo {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}

.hermes-message-task-mode > span:last-child {
  display: inline-flex;
  align-items: center;
}

.hermes-message-task-mode + p {
  display: inline;
  margin: 0;
  vertical-align: middle;
}

.hermes-tool-details {
  max-width: min(760px, 100%);
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.55;
}

.hermes-tool-details summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
  color: var(--text-faint);
  font-weight: 620;
}

.hermes-tool-details summary::-webkit-details-marker {
  display: none;
}

.hermes-tool-details summary::before {
  content: "+";
  font-weight: 700;
  color: var(--text-dim);
}

.hermes-tool-details[open] summary::before {
  content: "−";
}

.hermes-tool-details pre {
  margin: 8px 0 0;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.075);
  background: rgba(255,255,255,0.035);
  color: var(--text-dim);
  padding: 11px 12px;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 12px;
}

.hermes-tool-inline {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  padding: 0 4px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-align: left;
}

.hermes-tool-stream {
  width: min(760px, 100%);
  min-width: 0;
  min-height: 30px;
  display: flex;
  align-items: center;
}

.hermes-tool-stream-current {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  min-height: 30px;
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  padding: 0 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}

.hermes-tool-stream-copy {
  position: relative;
  min-width: 0;
  height: 21px;
  display: block;
  overflow: hidden;
  white-space: nowrap;
}

.hermes-tool-stream-handoff {
  min-width: 0;
  max-width: 100%;
  height: 21px;
  display: grid;
  overflow: hidden;
  white-space: nowrap;
}

.hermes-tool-stream-handoff > .hermes-tool-stream-copy {
  grid-area: 1 / 1;
}

.hermes-tool-stream-current[data-tool-streaming="true"] .hermes-tool-stream-copy,
.hermes-tool-stream-current[data-tool-settling="true"] .hermes-tool-stream-copy.is-settling-wave {
  -webkit-mask-image: repeating-linear-gradient(90deg, rgba(0,0,0,0.42) 0 42px, rgba(0,0,0,0.72) 68px, #000 90px, rgba(0,0,0,0.72) 112px, rgba(0,0,0,0.42) 138px 180px);
  mask-image: repeating-linear-gradient(90deg, rgba(0,0,0,0.42) 0 42px, rgba(0,0,0,0.72) 68px, #000 90px, rgba(0,0,0,0.72) 112px, rgba(0,0,0,0.42) 138px 180px);
  -webkit-mask-size: 180px 100%;
  mask-size: 180px 100%;
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
}

.hermes-tool-stream-current[data-tool-streaming="true"] .hermes-tool-stream-copy {
  animation: hermesToolActivityWave 1.6s linear infinite;
  animation-delay: var(--hermes-tool-activity-delay, 0ms);
}

.hermes-tool-stream-current[data-tool-settling="true"] .hermes-tool-stream-copy.is-settling-wave {
  animation:
    hermesToolActivityWave 1.6s linear infinite,
    hermesToolActivitySettleOut 280ms cubic-bezier(0.45, 0, 0.55, 1) both;
  animation-delay:
    var(--hermes-tool-activity-delay, 0ms),
    var(--hermes-tool-activity-settle-delay, 0ms);
}

.hermes-tool-stream-current[data-tool-settling="true"] .hermes-tool-stream-copy.is-settling-rest {
  opacity: 0;
  animation: hermesToolActivitySettleIn 280ms cubic-bezier(0.45, 0, 0.55, 1) both;
  animation-delay: var(--hermes-tool-activity-settle-delay, 0ms);
}

.hermes-tool-stream-line {
  min-width: 0;
  max-width: 100%;
  height: 21px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.hermes-tool-stream-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hermes-tool-stream-current[data-tool-status="running"],
.hermes-tool-stream-current[data-tool-status="progress"] {
  color: var(--text);
}

.hermes-tool-stream-current[data-tool-status="failed"] {
  color: #ffb4b4;
}

.hermes-tool-stream-current:hover,
.hermes-tool-stream-current:focus-visible {
  color: var(--text);
  text-decoration: underline;
  outline: none;
}

.hermes-tool-stream-line.is-entering {
  animation: hermesToolStreamIn 280ms cubic-bezier(0.45, 0, 0.55, 1);
  animation-delay: var(--hermes-tool-transition-delay, 0ms);
}

.hermes-tool-stream-line.is-leaving {
  position: absolute;
  inset: 0 auto auto 0;
  pointer-events: none;
  animation: hermesToolStreamOut 280ms cubic-bezier(0.45, 0, 0.55, 1) forwards;
  animation-delay: var(--hermes-tool-transition-delay, 0ms);
}

.hermes-tool-stack-toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, color var(--transition), background var(--transition);
}

.hermes-tool-stream:hover .hermes-tool-stack-toggle,
.hermes-tool-stream:focus-within .hermes-tool-stack-toggle {
  opacity: 1;
  pointer-events: auto;
}

.hermes-tool-stack-toggle:hover,
.hermes-tool-stack-toggle:focus-visible {
  color: var(--text);
  background: rgba(255,255,255,0.06);
  outline: none;
}

.hermes-tool-stack-toggle .ui-icon {
  width: 15px;
  height: 15px;
  display: block;
  transition: transform 180ms ease;
}

.hermes-tool-stack-toggle > span {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.hermes-tool-stack-toggle[aria-expanded="true"] .ui-icon {
  transform: rotate(90deg);
}

@media (hover: none), (pointer: coarse) {
  .hermes-tool-stack-toggle {
    opacity: 1;
    pointer-events: auto;
  }
}

.hermes-tool-stack-list {
  width: min(760px, 100%);
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 4px;
  margin: 4px 0 0 6px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.10);
  list-style: none;
}

.hermes-tool-stack-list li {
  min-width: 0;
}

.hermes-tool-stack-list[hidden] {
  display: none;
}

.hermes-tool-stack-list .hermes-tool-inline {
  width: 100%;
  min-height: 26px;
}

@keyframes hermesToolStreamIn {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hermesToolActivityWave {
  from { -webkit-mask-position: -180px 0; mask-position: -180px 0; }
  to { -webkit-mask-position: 0 0; mask-position: 0 0; }
}

@keyframes hermesToolActivitySettleOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes hermesToolActivitySettleIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes hermesToolStreamOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-100%); }
}

@media (prefers-reduced-motion: reduce) {
  .hermes-tool-stream-line,
  .hermes-tool-stack-toggle .ui-icon {
    animation: none !important;
    transition: none !important;
  }
  .hermes-tool-stream-line.is-leaving {
    display: none;
  }
  .hermes-tool-stream-current[data-tool-streaming="true"] .hermes-tool-stream-copy {
    animation: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
  .hermes-tool-stream-current[data-tool-settling="true"] .hermes-tool-stream-copy.is-settling-wave {
    display: none;
  }
  .hermes-tool-stream-current[data-tool-settling="true"] .hermes-tool-stream-copy.is-settling-rest {
    opacity: 1;
    animation: none !important;
  }
}

.hermes-tool-inline[data-tool-status="running"] {
  color: var(--text);
}

.hermes-tool-inline[data-tool-status="failed"] {
  color: #ffb4b4;
}

.hermes-tool-status {
  color: var(--text-faint);
  font-size: 12px;
  white-space: nowrap;
}

.hermes-tool-inline:hover,
.hermes-tool-inline:focus-visible {
  color: var(--text);
  background: transparent;
  text-decoration: underline;
  outline: none;
}

.hermes-tool-action {
  color: var(--text-faint);
  font-size: 12px;
  text-decoration: none;
}

.hermes-tool-chevron {
  align-items: center;
  display: inline-flex;
  line-height: 1;
  transform: translateY(1px);
}

.hermes-tool-chevron .ui-icon {
  width: 14px;
  height: 14px;
}

.hermes-tool-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  width: min(var(--hermes-tool-sidebar-w), calc(100vw - 24px));
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #000000;
  border-left: 1px solid rgba(255,255,255,0.10);
  box-shadow: -18px 0 46px rgba(0,0,0,0.38);
  transform: translateX(100%);
  visibility: hidden;
  overscroll-behavior: contain;
  contain: layout paint;
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1), visibility 220ms ease;
}

.hermes-tool-sidebar.open {
  transform: translateX(0);
  visibility: visible;
}

@media (min-width: 900px) {
  .hermes-chat-shell.tool-panel-open {
    --hermes-tool-open-rail-width: min(
      var(--hermes-rail-max),
      max(240px, calc(100% - var(--hermes-tool-sidebar-w) - var(--hermes-rail-side-room))),
      calc(100% - var(--hermes-tool-sidebar-w) - 32px)
    );
    --hermes-tool-open-rail-gutter: max(
      16px,
      calc((100% - var(--hermes-tool-sidebar-w) - var(--hermes-tool-open-rail-width)) / 2)
    );
    --hermes-composer-shift: calc(var(--hermes-tool-sidebar-w) / -2);
  }

  .hermes-chat-shell.tool-panel-open .hermes-messages {
    width: calc(100% - var(--hermes-tool-sidebar-w));
    padding-left: var(--hermes-tool-open-rail-gutter);
    padding-right: max(
      0px,
      calc(var(--hermes-tool-open-rail-gutter) - var(--hermes-messages-scrollbar-w, 0px))
    );
  }

  .hermes-chat-shell.tool-panel-open .hermes-composer {
    width: var(--hermes-tool-open-rail-width);
  }
}

.hermes-tool-sidebar-header {
  height: var(--sidebar-header-h);
  min-height: var(--sidebar-header-h);
  flex: 0 0 var(--sidebar-header-h);
  padding: 0 12px 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.018);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hermes-tool-sidebar-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hermes-tool-sidebar-title strong {
  color: var(--text);
  font-size: 19px;
  line-height: 1.15;
  font-weight: 760;
  letter-spacing: -0.045em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hermes-tool-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 0;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: color var(--transition), transform var(--transition);
}

.hermes-tool-close .ui-icon {
  width: 25px;
  height: 25px;
}

.hermes-tool-close .ui-icon path {
  stroke-width: 2.8;
}

.hermes-tool-close:hover,
.hermes-tool-close:focus-visible {
  color: var(--text);
  background: transparent;
  transform: scale(1.04);
  outline: none;
}

.hermes-tool-sidebar-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 16px;
}

.hermes-tool-sidebar-body pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text-dim);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
}

.hermes-typing-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  will-change: opacity, transform;
  animation: hermesPulse 1.35s ease-in-out infinite;
}

@keyframes hermesPulse {
  0%, 100% { opacity: .28; transform: scale(.72); }
  50% { opacity: 1; transform: scale(1.14); }
}

.hermes-composer {
  width: var(--hermes-rail-width);
  margin: 0;
  min-height: 52px;
  padding: 8px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "leading primary model trailing";
  align-items: flex-end;
  align-content: end;
  column-gap: 7px;
  row-gap: 0;
  border-radius: 28px;
  background: #212121;
  border: 0;
  box-shadow: none;
  position: absolute;
  left: 50%;
  bottom: var(--hermes-composer-bottom);
  transform: translateX(calc(-50% + var(--hermes-composer-shift, 0px)));
  z-index: 35;
  transition: height 210ms cubic-bezier(0.16, 1, 0.3, 1), transform 180ms ease, width 180ms ease;
}

.hermes-composer.is-resizing {
  will-change: height;
}

.hermes-composer.has-attachments {
  grid-template-areas:
    "attachments attachments attachments attachments"
    "leading primary model trailing";
}

.hermes-composer.is-multiline {
  grid-template-areas:
    "primary primary primary primary"
    "leading . model trailing";
}

.hermes-composer.is-multiline.has-attachments {
  grid-template-areas:
    "attachments attachments attachments attachments"
    "primary primary primary primary"
    "leading . model trailing";
}

.hermes-composer textarea {
  grid-area: primary;
  flex: 1;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  max-height: 132px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 5px 0;
  font: inherit;
  font-size: 16px;
  line-height: 26px;
  overflow-y: hidden;
  overflow-x: hidden;
  scrollbar-width: none;
  transition: height 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hermes-composer.is-multiline textarea {
  width: 100%;
  padding-inline: 10px;
}

.hermes-composer.is-multiline .hermes-model-readonly,
.hermes-composer.is-multiline .hermes-model-wrap {
  justify-self: end;
}

.hermes-composer textarea::-webkit-scrollbar {
  display: none;
}

.hermes-composer textarea::placeholder {
  color: rgba(255,255,255,0.60);
  opacity: 1;
}

.hermes-queued-prompt {
  position: absolute;
  left: 50%;
  bottom: calc(var(--hermes-composer-bottom) + var(--hermes-composer-current-h) - 6px);
  width: calc(var(--hermes-rail-width) - 32px);
  max-height: min(42vh, 360px);
  min-width: 0;
  z-index: 34;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  pointer-events: none;
  transform: translateX(calc(-50% + var(--hermes-composer-shift, 0px)));
}

.hermes-queued-prompt::-webkit-scrollbar {
  display: none;
}

.hermes-queued-prompt[hidden] {
  display: none;
}

.hermes-queued-prompt-card {
  width: 100%;
  min-height: 36px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 64px 0 12px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 0;
  background: #1b1b1d;
  color: var(--text-dim);
  box-shadow: 0 8px 22px rgba(0,0,0,0.30);
  pointer-events: auto;
  transform-origin: center bottom;
}

.hermes-queued-prompt-card:first-child {
  border-radius: 15px 15px 0 0;
}

.hermes-queued-prompt-card:not(:last-child) {
  border-bottom: 0;
  box-shadow: none;
}

.hermes-queued-prompt-card + .hermes-queued-prompt-card {
  border-top: 0;
}

.hermes-queued-prompt-card:last-child {
  animation: hermesQueuedPromptIn 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hermes-queued-prompt-copy {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--text-dim);
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hermes-queued-prompt-edit,
.hermes-queued-prompt-cancel {
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transform: translateY(-50%);
}

.hermes-queued-prompt-edit {
  right: 32px;
}

.hermes-queued-prompt-cancel {
  right: 6px;
}

.hermes-queued-prompt-edit:hover,
.hermes-queued-prompt-edit:focus-visible,
.hermes-queued-prompt-cancel:hover,
.hermes-queued-prompt-cancel:focus-visible {
  background: rgba(255,255,255,0.07);
  color: var(--text);
  outline: none;
}

.hermes-queued-prompt-edit .ui-icon,
.hermes-queued-prompt-cancel .ui-icon {
  width: 15px;
  height: 15px;
}

@keyframes hermesQueuedPromptIn {
  from { opacity: 0; transform: translateY(5px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hermes-file-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.hermes-attachment-list,
.home-hermes-attachment-list {
  grid-area: attachments;
  order: -1;
  flex: 1 0 100%;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 4px 4px 6px;
  min-width: 0;
}

.hermes-attachment-list:empty,
.home-hermes-attachment-list:empty {
  display: none;
}

.hermes-attach-btn,
.home-hermes-attach-btn {
  grid-area: leading;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: color-mix(in srgb, var(--text) 78%, transparent);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), opacity var(--transition);
}

/* A session composer grows upward from its fixed bottom edge. Keep the
   attachment control on the lower action row instead of vertically centering
   it beside a multi-line prompt. */
.hermes-composer .hermes-attach-btn {
  width: 36px;
  height: 36px;
  min-height: 36px;
  align-self: flex-end;
  margin-top: auto;
  margin-bottom: 0;
}

.hermes-attach-btn:hover,
.hermes-attach-btn:focus-visible,
.home-hermes-attach-btn:hover,
.home-hermes-attach-btn:focus-visible {
  color: var(--text);
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.08);
  outline: none;
}

.hermes-attach-btn:disabled,
.home-hermes-attach-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hermes-attach-btn .ui-icon,
.home-hermes-attach-btn .ui-icon {
  width: 22px;
  height: 22px;
}

.hermes-attach-menu {
  position: fixed;
  z-index: 600;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: calc(100% - 16px);
  color: var(--text);
  pointer-events: none;
  animation: hermesAttachMenuIn 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes hermesAttachMenuIn {
  from { opacity: 0; transform: translateY(5px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hermes-attach-menu[data-scope="home"] {
  align-items: flex-start;
  animation-name: hermesAttachMenuDownIn;
}

@keyframes hermesAttachMenuDownIn {
  from { opacity: 0; transform: translateY(-5px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hermes-attach-menu-card,
.hermes-attach-submenu {
  width: 200px;
  max-width: calc(100vw - 16px);
  padding: 6px 0;
  border: 0;
  border-radius: 16px;
  background: #353535;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.32),
    inset 0 0 1px rgba(255, 255, 255, 0.20),
    0 0 1px rgba(0, 0, 0, 0.62);
  pointer-events: auto;
}

.hermes-attach-menu-card {
  display: flex;
  flex-direction: column;
}

.hermes-attach-menu-item {
  width: calc(100% - 12px);
  min-height: 36px;
  margin: 0 6px;
  padding: 6px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.hermes-attach-menu-item[data-hermes-attach-photo],
.hermes-attach-menu-item[data-hermes-home-action] {
  grid-template-columns: 22px minmax(0, 1fr);
}

.hermes-attach-menu-icon,
.hermes-attach-menu-chevron,
.hermes-attach-submenu-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hermes-attach-menu-icon .ui-icon {
  width: 20px;
  height: 20px;
}

.hermes-attach-menu-icon .home-obsidian-task-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.hermes-attach-menu-chevron {
  color: var(--text-dim);
}

.hermes-attach-menu-chevron .ui-icon {
  width: 17px;
  height: 17px;
}

.hermes-attach-menu-item:focus-visible,
.hermes-attach-submenu-back:focus-visible,
.hermes-attach-submenu-error button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

@media (hover: hover) and (pointer: fine) {
  .hermes-attach-menu-item:hover,
  .hermes-attach-submenu-back:hover,
  .hermes-attach-submenu-error button:hover {
    background: rgba(255, 255, 255, 0.075);
  }
}

.hermes-attach-menu-item:active,
.hermes-attach-submenu-back:active,
.hermes-attach-submenu-error button:active {
  background: rgba(255, 255, 255, 0.1);
}

.hermes-attach-menu-separator {
  height: 1px;
  margin: 4px 16px;
  background: rgba(255, 255, 255, 0.1);
}

.hermes-attach-submenu {
  display: flex;
  flex-direction: column;
  width: 220px;
  max-height: min(336px, calc(100dvh - 24px));
  padding: 6px 0;
}

.hermes-attach-submenu[hidden] {
  display: none;
}

.hermes-attach-submenu-header {
  display: none;
  align-items: center;
}

.hermes-attach-submenu-back {
  display: none;
  width: 36px;
  height: 36px;
  margin-left: -8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.hermes-attach-submenu-back .ui-icon {
  width: 18px;
  height: 18px;
  transform: rotate(180deg);
}

.hermes-attach-submenu-content {
  min-height: 48px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.hermes-attach-capability {
  width: calc(100% - 12px);
  min-height: 36px;
  margin: 0 6px;
  padding: 6px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  border-radius: 10px;
}

.hermes-attach-capability-copy {
  min-width: 0;
  display: block;
}

.hermes-attach-capability-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
}

.hermes-attach-submenu-empty,
.hermes-attach-submenu-error {
  margin: 0;
  padding: 10px 8px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.45;
}

.hermes-attach-submenu-error p {
  margin: 0 0 8px;
}

.hermes-attach-submenu-error button {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.hermes-attach-submenu-loading {
  padding: 6px 8px 8px;
  display: grid;
  gap: 6px;
}

.hermes-attach-submenu-loading span {
  height: 32px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  animation: hermesAttachMenuLoading 1.25s ease-in-out infinite;
}

.hermes-attach-submenu-loading span:nth-child(2) { animation-delay: 90ms; }
.hermes-attach-submenu-loading span:nth-child(3) { animation-delay: 180ms; }

@keyframes hermesAttachMenuLoading {
  0%, 100% { opacity: 0.42; }
  50% { opacity: 0.92; }
}

html[data-theme="light"] .hermes-attach-menu-card,
html[data-theme="light"] .hermes-attach-submenu {
  background: #ffffff;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.14),
    inset 0 0 1px rgba(255, 255, 255, 0.74),
    0 0 1px rgba(0, 0, 0, 0.16);
}

html[data-theme="light"] .hermes-attach-menu-separator {
  background: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .hermes-attach-submenu-content {
  scrollbar-color: rgba(0, 0, 0, 0.26) transparent;
}

html[data-theme="light"] .hermes-attach-submenu-loading span {
  background: rgba(0, 0, 0, 0.06);
}

@media (hover: hover) and (pointer: fine) {
  html[data-theme="light"] .hermes-attach-menu-item:hover,
  html[data-theme="light"] .hermes-attach-submenu-back:hover,
  html[data-theme="light"] .hermes-attach-submenu-error button:hover {
    background: rgba(0, 0, 0, 0.06);
  }
}

html[data-theme="light"] .hermes-attach-menu-item:active,
html[data-theme="light"] .hermes-attach-submenu-back:active,
html[data-theme="light"] .hermes-attach-submenu-error button:active {
  background: rgba(0, 0, 0, 0.09);
}

@media (max-width: 40rem) {
  .hermes-attach-menu.has-submenu .hermes-attach-menu-card {
    display: none;
  }

  .hermes-attach-submenu {
    width: min(220px, calc(100vw - 16px));
  }

  .hermes-attach-submenu-back {
    display: inline-flex;
  }

  .hermes-attach-submenu-header {
    min-height: 42px;
    padding: 0 10px;
    display: flex;
  }
}

@media (pointer: coarse) {
  .hermes-attach-menu-item,
  .hermes-attach-capability {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hermes-attach-menu {
    animation-duration: 120ms;
    transform: none;
  }

  .hermes-attach-submenu-loading span {
    animation-duration: 1.8s;
  }
}

.hermes-attachment-card {
  position: relative;
  width: 116px;
  height: 116px;
  flex: 0 0 116px;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
}

.hermes-attachment-thumb {
  width: 100%;
  height: 100%;
  display: block;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
}

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

.hermes-message-images {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hermes-message-image-link {
  max-width: min(240px, 100%);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  display: inline-flex;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
}

.hermes-message-image-link:focus-visible {
  outline: 2px solid rgba(255,255,255,0.55);
  outline-offset: 2px;
}

.hermes-message-image-thumb {
  width: min(240px, 100%);
  max-height: 260px;
  object-fit: cover;
  display: block;
}

.markdown-body .hermes-generated-image-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.045);
  cursor: zoom-in;
}

.markdown-body .hermes-generated-image {
  display: block;
  width: auto;
  max-width: min(100%, 720px);
  max-height: 72vh;
  object-fit: contain;
}

.markdown-body .hermes-generated-image-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.hermes-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.90);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.hermes-image-viewer.open {
  opacity: 1;
  pointer-events: auto;
}

.hermes-image-viewer-stage {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: max(64px, env(safe-area-inset-top)) max(48px, env(safe-area-inset-right)) max(48px, env(safe-area-inset-bottom)) max(48px, env(safe-area-inset-left));
  display: grid;
  place-items: center;
  box-sizing: border-box;
  overflow: auto;
}

.hermes-image-viewer-image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(1600px, calc(100vw - 96px));
  max-height: calc(100dvh - 112px);
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.48);
  animation: hermesImageViewerEnter 180ms ease-out both;
}

.hermes-image-viewer-actions {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hermes-image-viewer-action {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(54,54,54,0.88);
  color: #f7f7f7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 140ms ease, transform 140ms ease;
}

.hermes-image-viewer-action:hover {
  background: rgba(76,76,76,0.96);
}

.hermes-image-viewer-action:active {
  transform: scale(0.96);
}

.hermes-image-viewer-action:focus-visible {
  outline: 2px solid rgba(255,255,255,0.86);
  outline-offset: 2px;
}

.hermes-image-viewer-action .ui-icon {
  width: 20px;
  height: 20px;
}

body.hermes-image-viewer-open {
  overflow: hidden;
}

@keyframes hermesImageViewerEnter {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 640px) {
  .hermes-image-viewer-stage {
    padding: max(72px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }

  .hermes-image-viewer-image {
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 104px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hermes-image-viewer,
  .hermes-image-viewer-image,
  .hermes-image-viewer-action {
    animation: none;
    transition: none;
  }
}

.hermes-message-bubble > .hermes-message-images:first-child {
  margin-top: 0;
}

.hermes-message.user > .hermes-message-images {
  max-width: 100%;
  margin: 0;
  justify-content: flex-end;
}

.hermes-message.user > .hermes-message-images .hermes-message-image-link,
.hermes-message.user > .hermes-message-images .hermes-message-image-thumb {
  width: min(256px, 100%);
  max-width: min(256px, 100%);
}

.hermes-attachment-remove {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  padding: 0;
}

.hermes-attachment-remove:hover,
.hermes-attachment-remove:focus-visible {
  color: var(--text);
  background: rgba(255,255,255,0.10);
  outline: none;
}

.hermes-attachment-remove .ui-icon {
  width: 13px;
  height: 13px;
}

.hermes-attachment-card-image .hermes-attachment-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 24px;
  height: 24px;
  z-index: 1;
  color: #ffffff;
  background: rgba(20,20,20,0.9);
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.hermes-attachment-card-image .hermes-attachment-remove:hover,
.hermes-attachment-card-image .hermes-attachment-remove:focus-visible {
  color: #ffffff;
  background: #111111;
}

.hermes-send-btn {
  grid-area: trailing;
  width: 36px;
  height: 36px;
  min-height: 36px;
  flex: 0 0 auto;
  align-self: flex-end;
  margin-top: auto;
  margin-bottom: 0;
  background: var(--accent);
  color: #000000;
  border-color: var(--accent);
  transition: transform var(--transition);
}

.hermes-send-btn:disabled {
  transition: none;
}

.hermes-send-btn .ui-icon {
  width: 20px;
  height: 20px;
}

.hermes-send-btn[data-mode="stop"] {
  transform: scale(1.111111);
}

.hermes-send-btn[data-mode="stop"] .ui-icon {
  width: 22px;
  height: 22px;
}

.hermes-model-readonly {
  grid-area: model;
  align-self: flex-end;
  flex: 0 0 auto;
  height: 36px;
  min-height: 36px;
  min-width: 0;
  max-width: none;
  display: inline-flex;
  align-items: center;
  padding: 0 2px 0 4px;
  color: color-mix(in srgb, var(--text) 74%, transparent);
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  cursor: default;
  user-select: text;
  margin-top: auto;
  margin-bottom: 0;
  margin-right: 5px;
}

.hermes-model-wrap {
  grid-area: model;
  position: relative;
  align-self: flex-end;
  flex: 0 0 auto;
  width: max-content;
  min-width: 0;
  max-width: none;
  height: 36px;
  min-height: 36px;
  margin: auto 5px 0 0;
}

.hermes-model-btn {
  width: max-content;
  max-width: none;
  height: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 10px 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: color-mix(in srgb, var(--text) 78%, transparent);
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  cursor: pointer;
}

.hermes-model-btn:hover:not(:disabled),
.hermes-model-btn[aria-expanded="true"] {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--text);
}

.hermes-model-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 72%, transparent);
  outline-offset: 1px;
}

.hermes-model-btn:disabled {
  cursor: default;
  opacity: .55;
}

.hermes-model-btn-label {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.hermes-model-chevron {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hermes-model-chevron .ui-icon {
  width: 14px;
  height: 14px;
}

.hermes-model-popover {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: calc(100% + 4px);
  z-index: 80;
  width: 224px;
  min-width: 224px;
  max-width: min(224px, calc(100vw - 24px));
  max-height: min(420px, 70vh);
  padding: 6px 0;
  overflow: visible;
  border: 0;
  border-radius: 16px;
  background: var(--hermes-model-popover-bg);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.32),
    inset 0 0 1px rgba(255, 255, 255, 0.20),
    0 0 1px rgba(0, 0, 0, 0.62);
  transform: translateX(-50%);
  transform-origin: 100% 100%;
  animation: hermes-model-popover-in 320ms cubic-bezier(0.23, 1, 0.32, 1) 30ms backwards;
}

.hermes-model-popover[hidden] {
  display: none;
}

@keyframes hermes-model-popover-in {
  from {
    opacity: 0;
    transform: translate(-50%, 4px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes hermes-model-popover-in-below {
  from {
    opacity: 0;
    transform: translate(-50%, -4px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes hermes-model-flyout-in {
  from {
    opacity: 0;
    transform: translateX(-4px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes hermes-model-flyout-in-left {
  from {
    opacity: 0;
    transform: translateX(4px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.hermes-model-popover.has-settings {
  max-height: min(420px, 70vh);
}

.hermes-model-view-viewport {
  width: 100%;
  height: var(--hermes-model-quick-height, 36px);
  overflow: clip;
  transition: height 400ms cubic-bezier(0.19, 1, 0.22, 1);
}

.hermes-model-view-viewport.has-reasoning {
  height: var(--hermes-model-quick-height, 76px);
}

.hermes-model-popover.is-advanced .hermes-model-view-viewport {
  height: var(--hermes-model-advanced-height, 148px);
}

.hermes-model-view-track {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transform: translateY(0);
  transition: transform 400ms cubic-bezier(0.19, 1, 0.22, 1);
}

.hermes-model-popover.is-advanced .hermes-model-view-track {
  transform: translateY(calc(-1 * var(--hermes-model-quick-panel-height, 40px)));
}

.hermes-model-quick-panel,
.hermes-model-advanced-panel {
  width: 100%;
  flex: 0 0 auto;
  opacity: 1;
  transition: opacity 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

.hermes-model-quick-panel {
  height: var(--hermes-model-quick-panel-height, 40px);
}

.hermes-model-advanced-panel {
  position: relative;
  box-sizing: border-box;
  padding-top: 3px;
  border-top: 0;
  opacity: 0;
}

.hermes-model-advanced-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8px;
  right: 8px;
  height: 1px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
  pointer-events: none;
}

.hermes-model-popover.is-advanced .hermes-model-quick-panel {
  opacity: 0;
}

.hermes-model-popover.is-advanced .hermes-model-advanced-panel {
  opacity: 1;
}

.hermes-model-quick-panel[aria-hidden="true"],
.hermes-model-advanced-panel[aria-hidden="true"] {
  pointer-events: none;
  opacity: 0;
}

.hermes-model-popover > .hermes-model-advanced-panel {
  position: static;
  width: 100%;
  padding-top: 0;
  border-top: 0;
  transform: none;
  opacity: 1;
}

.hermes-model-popover > .hermes-model-advanced-panel::before {
  content: none;
}

.hermes-reasoning-scale {
  position: relative;
  width: 100%;
  height: 40px;
  padding: 8px 14px 4px;
}

.hermes-reasoning-rail {
  position: relative;
  width: 100%;
  height: 28px;
}

.hermes-reasoning-scale-track {
  position: absolute;
  inset: 2px 0;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.hermes-reasoning-scale-fill {
  display: block;
  width: var(--hermes-reasoning-position, 0%);
  height: 100%;
  border-radius: 12px 0 0 12px;
  background: #0285ff;
  transition: width 300ms cubic-bezier(0.23, 1, 0.32, 1);
}

.hermes-reasoning-scale[data-active-index="0"] {
  --hermes-reasoning-position: 6.63%;
}

.hermes-reasoning-scale[data-active-index="1"] {
  --hermes-reasoning-position: 28.32%;
}

.hermes-reasoning-scale[data-active-index="2"] {
  --hermes-reasoning-position: 50%;
}

.hermes-reasoning-scale[data-active-index="3"] {
  --hermes-reasoning-position: 71.68%;
}

.hermes-reasoning-scale[data-active-index="4"] {
  --hermes-reasoning-position: 93.37%;
}

.hermes-reasoning-ticks {
  position: absolute;
  inset: 2px 0;
  pointer-events: none;
}

.hermes-reasoning-tick {
  position: absolute;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.30);
  transform: translate(-50%, -50%);
  transition: background-color 300ms cubic-bezier(0.23, 1, 0.32, 1), transform 120ms;
}

.hermes-reasoning-tick:nth-child(1) { left: 6.63%; }
.hermes-reasoning-tick:nth-child(2) { left: 28.32%; }
.hermes-reasoning-tick:nth-child(3) { left: 50%; }
.hermes-reasoning-tick:nth-child(4) { left: 71.68%; }
.hermes-reasoning-tick:nth-child(5) { left: 93.37%; }

.hermes-reasoning-thumb {
  position: absolute;
  z-index: 2;
  left: var(--hermes-reasoning-position, 6.63%);
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.10);
  transform: translateX(-50%);
  transition:
    left 300ms cubic-bezier(0.23, 1, 0.32, 1),
    transform 180ms cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
}

.hermes-reasoning-scale:has(.hermes-reasoning-slider:active) .hermes-reasoning-thumb {
  transform: translateX(-50%) scale(.96);
}

.hermes-reasoning-scale[data-active-index="-1"] .hermes-reasoning-scale-fill,
.hermes-reasoning-scale[data-active-index="-1"] .hermes-reasoning-thumb {
  opacity: 0;
}

.hermes-reasoning-slider {
  position: absolute;
  z-index: 3;
  left: 14px;
  top: 8px;
  width: calc(100% - 28px);
  height: 28px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.hermes-reasoning-scale:has(.hermes-reasoning-slider:focus-visible) .hermes-reasoning-rail {
  outline: 2px solid rgba(2, 133, 255, 0.78);
  outline-offset: 1px;
  border-radius: 14px;
}

.hermes-model-settings-row,
.hermes-model-flyout-back {
  width: calc(100% - 12px);
  min-height: 36px;
  margin: 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-align: left;
}

.hermes-model-advanced-heading:not(.is-static),
.hermes-model-settings-row,
.hermes-model-flyout-back {
  cursor: pointer;
}

.hermes-model-advanced-heading:not(.is-static):hover,
.hermes-model-advanced-heading:not(.is-static):focus-visible,
.hermes-model-settings-row:hover,
.hermes-model-settings-row:focus-visible,
.hermes-model-settings-row.is-open,
.hermes-model-flyout-back:hover,
.hermes-model-flyout-back:focus-visible {
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.hermes-model-advanced-heading:not(.is-static):focus-visible,
.hermes-model-settings-row:focus-visible,
.hermes-model-flyout-back:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: -2px;
}

.hermes-model-view-controls {
  position: relative;
  width: calc(100% - 12px);
  height: 36px;
  flex: 0 0 36px;
  margin: 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0;
}

.hermes-model-advanced-trigger {
  width: auto;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--hermes-model-control-muted);
  font-family: -apple-system-body, ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: normal;
  cursor: pointer;
  transition:
    opacity 300ms cubic-bezier(0.23, 1, 0.32, 1),
    translate 400ms cubic-bezier(0.19, 1, 0.22, 1),
    background-color 120ms ease;
}

.hermes-model-advanced-trigger-content {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hermes-model-advanced-trigger-content .ui-icon {
  width: 12px;
  height: 12px;
}

.hermes-model-bolt {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--hermes-model-control-muted);
  cursor: pointer;
  transition:
    opacity 300ms cubic-bezier(0.23, 1, 0.32, 1),
    background-color 120ms ease;
}

.hermes-model-bolt .ui-icon {
  width: 16px;
  height: 16px;
}

.hermes-reasoning-endpoints {
  position: absolute;
  inset: 4px 0 0;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  color: var(--hermes-model-control-muted);
  font-family: -apple-system-body, ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1);
}

.hermes-model-view-controls.is-adjusting .hermes-model-advanced-trigger,
.hermes-model-view-controls.is-adjusting .hermes-model-bolt {
  opacity: 0;
  pointer-events: none;
}

.hermes-model-view-controls.is-adjusting .hermes-reasoning-endpoints {
  opacity: 1;
}

.hermes-model-advanced-trigger:hover,
.hermes-model-advanced-trigger:focus-visible,
.hermes-model-bolt:hover:not(:disabled),
.hermes-model-bolt:focus-visible {
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.hermes-model-bolt.is-selected {
  color: #0285ff;
}

.hermes-model-bolt:disabled {
  cursor: default;
  opacity: 1;
}

/* Keep the session-composer advanced menu aligned with ChatGPT's reading
   order: settings first, followed by the control that returns to the compact
   reasoning view. The centered new-chat composer keeps its existing layout. */
.hermes-composer .hermes-model-popover.is-advanced .hermes-model-quick-panel {
  order: 1;
}

.hermes-composer .hermes-model-popover.is-advanced .hermes-model-advanced-panel {
  order: 2;
  padding-top: 0;
  padding-bottom: 3px;
}

.hermes-composer .hermes-model-popover.is-advanced .hermes-model-advanced-panel::before {
  top: auto;
  bottom: 0;
}

.hermes-composer .hermes-model-popover.is-advanced .hermes-model-view-controls {
  order: 3;
}

.hermes-composer .hermes-model-popover.is-advanced .hermes-model-advanced-trigger-content .ui-icon {
  transform: rotate(-90deg);
}

.hermes-model-popover.is-advanced .hermes-model-bolt {
  pointer-events: none;
  opacity: 0;
}

.hermes-model-advanced-trigger:focus-visible,
.hermes-model-bolt:focus-visible {
  outline: 2px solid rgba(2, 133, 255, 0.72);
  outline-offset: -2px;
}

.hermes-model-advanced-heading {
  width: auto;
  min-height: 32px;
  margin: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: color-mix(in srgb, var(--text) 68%, transparent);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.hermes-model-advanced-heading.is-static {
  cursor: default;
}

.hermes-model-advanced-heading .ui-icon {
  width: 12px;
  height: 12px;
}

.hermes-model-advanced-divider {
  position: relative;
  height: 8px;
  margin: 0 12px;
}

.hermes-model-advanced-divider::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 5px;
  height: 1px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
}

.hermes-model-settings-row {
  color: var(--text);
}

.hermes-model-settings-value {
  min-width: 0;
  max-width: 65%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  overflow: hidden;
  color: color-mix(in srgb, var(--text) 62%, transparent);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hermes-model-settings-value-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hermes-model-settings-value .ui-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.hermes-model-popover.is-restored,
.hermes-model-flyout.is-restored {
  animation: none;
}

.hermes-model-flyout {
  position: absolute;
  left: calc(100% - 4px);
  right: auto;
  bottom: auto;
  z-index: 2;
  width: max-content;
  min-width: 163px;
  max-width: min(260px, calc(100vw - 32px));
  padding: 6px 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: var(--hermes-model-popover-bg);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.32),
    inset 0 0 1px rgba(255, 255, 255, 0.20),
    0 0 1px rgba(0, 0, 0, 0.62);
  transform-origin: 0 0;
  animation: hermes-model-flyout-in 160ms cubic-bezier(0.23, 1, 0.32, 1) both;
}

.hermes-model-flyout[hidden] {
  display: none;
}

.hermes-model-flyout.opens-left {
  left: auto;
  right: calc(100% - 4px);
  transform-origin: 100% 0;
  animation-name: hermes-model-flyout-in-left;
}

.hermes-model-flyout-back {
  display: none;
  justify-content: flex-start;
}

.hermes-model-flyout-back .ui-icon {
  transform: rotate(180deg);
}

.hermes-model-options {
  width: calc(100% + 5px);
  max-height: min(320px, 50vh, var(--hermes-model-options-max-height, 320px));
  margin-right: -5px;
  padding-right: 5px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  transition: scrollbar-color 180ms ease;
}

.hermes-model-options:hover,
.hermes-model-options.is-scrolling {
  scrollbar-color: color-mix(in srgb, var(--text) 38%, transparent) transparent;
}

.hermes-model-options::-webkit-scrollbar {
  width: 6px;
}

.hermes-model-options::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.hermes-model-options::-webkit-scrollbar-track {
  background: transparent;
}

.hermes-model-options::-webkit-scrollbar-thumb {
  border: 1px solid transparent;
  border-right: 0;
  border-radius: 999px;
  background-color: transparent;
  background-clip: padding-box;
  transition: background-color 180ms ease;
}

.hermes-model-options:hover::-webkit-scrollbar-thumb,
.hermes-model-options.is-scrolling::-webkit-scrollbar-thumb {
  background-color: color-mix(in srgb, var(--text) 38%, transparent);
  background-clip: padding-box;
}

@media (prefers-reduced-motion: reduce) {
  .hermes-model-options,
  .hermes-model-options::-webkit-scrollbar-thumb {
    transition: none;
  }
}

.hermes-model-option {
  width: calc(100% - 12px);
  min-height: 36px;
  margin: 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-align: left;
  cursor: pointer;
}

.hermes-model-option:hover,
.hermes-model-option:focus-visible {
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.hermes-model-option:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: -2px;
}

.hermes-model-option-copy {
  min-width: 0;
}

.hermes-model-option-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.hermes-model-option-copy small {
  display: block;
  margin-top: -1px;
  color: color-mix(in srgb, var(--text) 58%, transparent);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  white-space: nowrap;
}

.hermes-model-option:has(.hermes-model-option-copy small) {
  min-height: 51px;
}

.hermes-model-option-check {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: var(--text);
}

.hermes-model-option-check .ui-icon {
  width: 17px;
  height: 17px;
}

html[data-theme="light"] .hermes-model-popover {
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.14),
    inset 0 0 1px rgba(255, 255, 255, 0.74),
    0 0 1px rgba(0, 0, 0, 0.16);
}

html[data-theme="light"] .hermes-model-flyout {
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.14),
    inset 0 0 1px rgba(255, 255, 255, 0.74),
    0 0 1px rgba(0, 0, 0, 0.16);
}

@media (max-width: 640px) {
  .hermes-model-flyout {
    inset: 0 0 auto auto;
    width: 100%;
    min-width: 100%;
  }

  .hermes-model-flyout-back {
    display: flex;
  }
}

.hermes-chat-loading {
  min-height: 100%;
  display: grid;
  place-items: center;
}

.hermes-chat-loading span {
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255,255,255,0.15);
  border-top-color: var(--text-dim);
  border-radius: 50%;
  animation: hermes-loading-spin 760ms linear infinite;
}

.hermes-chat-error {
  width: min(380px, 100%);
  margin: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  background: #171717;
  box-shadow: 0 18px 48px rgba(0,0,0,0.30);
}

.hermes-chat-error-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 50%;
  color: #ffb4b4;
  background: rgba(255,255,255,0.06);
}

.hermes-chat-error-icon .ui-icon {
  width: 19px;
  height: 19px;
}

.hermes-chat-error h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.hermes-chat-error p {
  margin: 8px 0 18px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.55;
}

.hermes-chat-retry {
  min-height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255,255,255,0.08);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.hermes-chat-retry:hover,
.hermes-chat-retry:focus-visible {
  border-color: rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.13);
  outline: none;
}

.hermes-chat-retry .ui-icon {
  width: 15px;
  height: 15px;
}

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

html[data-theme="light"] .hermes-chat-loading span {
  border-color: rgba(0,0,0,0.12);
  border-top-color: #55555b;
}

html[data-theme="light"] .hermes-chat-error {
  border-color: rgba(0,0,0,0.10);
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(0,0,0,0.10);
}

html[data-theme="light"] .hermes-chat-error-icon {
  color: #b42318;
  background: rgba(0,0,0,0.045);
}

html[data-theme="light"] .hermes-chat-retry {
  border-color: rgba(0,0,0,0.11);
  background: rgba(0,0,0,0.055);
}

html[data-theme="light"] .hermes-chat-retry:hover,
html[data-theme="light"] .hermes-chat-retry:focus-visible {
  border-color: rgba(0,0,0,0.16);
  background: rgba(0,0,0,0.09);
}

html[data-theme="light"] .toast {
  background: rgba(255,255,255,0.96);
  border-color: rgba(0,0,0,0.10);
  box-shadow: 0 18px 44px rgba(35,35,30,0.13);
}

html[data-theme="light"] .hermes-page,
html[data-theme="light"] .hermes-chat-shell,
html[data-theme="light"] .hermes-messages,
html[data-theme="light"] .hermes-session-panel,
html[data-theme="light"] .main-area.route-hermes,
html[data-theme="light"] .main-area.route-chat {
  background: #f7f7f4;
}

html[data-theme="light"] .hermes-scroll-bottom-btn {
  border-color: rgba(0,0,0,0.14);
  background: rgba(255,255,255,0.78);
  color: #151515;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

html[data-theme="light"] .hermes-scroll-bottom-btn:hover,
html[data-theme="light"] .hermes-scroll-bottom-btn:focus-visible {
  border-color: rgba(0,0,0,0.24);
  background: #f1f1ee;
}

html[data-theme="light"] .hermes-prompt-marker {
  background: rgba(0,0,0,0.24);
}

html[data-theme="light"] .hermes-prompt-marker:hover,
html[data-theme="light"] .hermes-prompt-marker:focus-visible,
html[data-theme="light"] .hermes-prompt-marker.is-active {
  background: rgba(0,0,0,0.62);
}

html[data-theme="light"] .hermes-prompt-navigator-popover {
  border-color: rgba(0,0,0,0.09);
  background: #f0f0f0;
  box-shadow: 0 14px 36px rgba(0,0,0,0.16);
}

html[data-theme="light"] .hermes-prompt-navigator-item {
  color: #3b3b3b;
}

html[data-theme="light"] .hermes-prompt-navigator-item:hover,
html[data-theme="light"] .hermes-prompt-navigator-item:focus-visible {
  background: rgba(0,0,0,0.075);
  color: #111111;
}

html[data-theme="light"] .hermes-prompt-navigator-item.is-active {
  color: #111111;
}

@media (prefers-reduced-motion: reduce) {
  .hermes-scroll-bottom-btn {
    transition: none;
  }
  .hermes-queued-prompt-card {
    animation: none;
  }
  .hermes-typing-dot {
    animation: none;
    opacity: .65;
    transform: scale(.9);
  }
}

html[data-theme="light"] .hermes-scroll-guard {
  background: #f7f7f4;
}

html[data-theme="light"] .hermes-scroll-guard.visible {
  border-bottom-color: rgba(0,0,0,0.035);
  box-shadow: 0 10px 28px rgba(35,35,30,0.08);
}

html[data-theme="light"] .hermes-composer {
  background: #f4f4f4;
  border: 0;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.10),
    0 6px 18px rgba(0,0,0,0.06);
}

html[data-theme="light"] .hermes-queued-prompt-card {
  border-color: rgba(0,0,0,0.10);
  background: #f1f1ee;
  box-shadow: 0 12px 30px rgba(30,30,25,0.12);
}

html[data-theme="light"] .hermes-queued-prompt-edit:hover,
html[data-theme="light"] .hermes-queued-prompt-edit:focus-visible,
html[data-theme="light"] .hermes-queued-prompt-cancel:hover,
html[data-theme="light"] .hermes-queued-prompt-cancel:focus-visible {
  background: rgba(0,0,0,0.06);
}

html[data-theme="light"] .hermes-attachment-card {
  background: rgba(0,0,0,0.045);
  border-color: rgba(0,0,0,0.10);
}

html[data-theme="light"] .hermes-attachment-thumb {
  background: rgba(0,0,0,0.055);
}

html[data-theme="light"] .hermes-attach-btn:hover,
html[data-theme="light"] .hermes-attach-btn:focus-visible,
html[data-theme="light"] .home-hermes-attach-btn:hover,
html[data-theme="light"] .home-hermes-attach-btn:focus-visible {
  background: rgba(0,0,0,0.055);
  border-color: rgba(0,0,0,0.08);
}

html[data-theme="light"] .hermes-message.user .hermes-message-bubble {
  background: #e7e7e5;
  border-color: transparent;
  color: #171717;
}

html[data-theme="light"] .hermes-send-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

html[data-theme="light"] .hermes-tool-details summary,
html[data-theme="light"] .hermes-tool-details pre {
  background: rgba(0,0,0,0.045);
  border-color: rgba(0,0,0,0.10);
}

html[data-theme="light"] .hermes-tool-sidebar {
  background: #f7f7f4;
  border-left-color: rgba(0,0,0,0.12);
  box-shadow: -28px 0 70px rgba(35,35,30,0.12);
}

html[data-theme="light"] .hermes-tool-sidebar-header {
  border-bottom-color: rgba(0,0,0,0.028);
}

html[data-theme="light"] .hermes-scroll-guard.visible {
  border-bottom-color: rgba(0,0,0,0.035);
  box-shadow: 0 10px 28px rgba(0,0,0,0.10);
}

html[data-theme="light"] .hermes-tool-close {
  background: transparent;
  color: var(--text-dim);
}

html[data-theme="light"] .hermes-tool-close:hover,
html[data-theme="light"] .hermes-tool-close:focus-visible {
  background: transparent;
  color: var(--text);
}

.markdown-body :where(p, ul, ol, pre, table, blockquote, h1, h2, h3, h4, h5, h6) {
  margin: 0 0 0.72em;
}

.markdown-body :where(p, ul, ol, pre, table, blockquote, h1, h2, h3, h4, h5, h6):last-child {
  margin-bottom: 0;
}

.markdown-body h1 { font-size: 1.55em; line-height: 1.2; font-weight: 720; }
.markdown-body h2 { font-size: 1.34em; line-height: 1.24; font-weight: 700; }
.markdown-body h3 { font-size: 1.16em; line-height: 1.28; font-weight: 680; }
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 { font-size: 1em; line-height: 1.35; font-weight: 670; }

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.35em;
}

.markdown-body li + li {
  margin-top: 0.24em;
}

.markdown-body code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 0.13em 0.34em;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

.markdown-body pre {
  max-width: 100%;
  overflow: auto;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.045);
  white-space: pre;
}

.markdown-body pre code {
  display: block;
  padding: 0;
  background: transparent;
  white-space: pre;
}

.markdown-code-block {
  max-width: 100%;
  margin: 0.92em 0 1em;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #202020;
}

.markdown-code-header {
  min-height: 44px;
  padding: 3px 12px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 0;
  color: var(--text-dim);
  font-size: 12px;
}

.markdown-code-identity {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.markdown-code-mark {
  color: #f1f1f1;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 720;
}

.markdown-code-language {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f1f1f1;
  font-weight: 620;
}

.markdown-code-copy {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}

.markdown-code-copy:hover,
.markdown-code-copy:focus-visible,
.markdown-code-copy.copied {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  outline: none;
}

.markdown-code-copy .ui-icon {
  width: 19px;
  height: 19px;
}

.markdown-code-block pre,
.markdown-code-block pre:last-child {
  margin: 0;
  padding: 2px 16px 17px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.markdown-code-block code {
  line-height: 1.6;
  color: #e8e8e8;
}

.markdown-code-block .code-token.comment { color: #8b949e; }
.markdown-code-block .code-token.string { color: #73c991; }
.markdown-code-block .code-token.keyword,
.markdown-code-block .code-token.variable,
.markdown-code-block .code-token.operator { color: #c586c0; }
.markdown-code-block .code-token.number { color: #dcdcaa; }

.markdown-body blockquote {
  padding-left: 12px;
  border-left: 2px solid rgba(255,255,255,0.18);
  color: var(--text-dim);
}

.markdown-body hr {
  height: 1px;
  border: 0;
  background: rgba(255,255,255,0.16);
  margin: 1.05em 0;
}

.latex-math {
  display: inline-flex;
  align-items: baseline;
  gap: 0.12em;
  font-family: "Times New Roman", "STIX Two Math", "Cambria Math", Georgia, serif;
  font-size: 1.03em;
  line-height: 1.35;
  white-space: nowrap;
}

.latex-math-block {
  display: flex;
  justify-content: center;
  width: 100%;
  overflow-x: auto;
  padding: 0.72em 0.85em;
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.075);
  white-space: nowrap;
}

.math-frac {
  display: inline-grid;
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: center;
  vertical-align: middle;
  line-height: 1.08;
  margin: 0 0.12em;
}

.math-num {
  border-bottom: 1px solid currentColor;
  padding: 0 0.22em 0.12em;
}

.math-den {
  padding: 0.12em 0.22em 0;
}

.math-sqrt {
  display: inline-flex;
  align-items: stretch;
  margin: 0 0.08em;
}

.math-radical {
  font-size: 1.18em;
  line-height: 1;
  padding-right: 0.05em;
}

.math-root {
  border-top: 1px solid currentColor;
  padding: 0.02em 0.18em 0;
}

.math-text {
  font-family: inherit;
  font-size: 0.92em;
}

.math-boxed {
  border: 1px solid currentColor;
  border-radius: 5px;
  padding: 0.02em 0.28em;
}

.math-overline {
  text-decoration: overline;
}

.math-underline {
  text-decoration: underline;
}

.latex-math sup,
.latex-math sub {
  font-size: 0.72em;
  line-height: 0;
}

.markdown-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 1.05em 0 1.15em;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.markdown-body > .markdown-table-wrap:first-child {
  margin-top: 0;
}

.markdown-body > .markdown-table-wrap:last-child {
  margin-bottom: 0;
}

.markdown-body table {
  width: 100%;
  min-width: max(360px, var(--markdown-table-min-width, 360px));
  border-collapse: collapse;
  border-top: 0;
  font-size: 0.94em;
  margin: 0;
}

.markdown-body th,
.markdown-body td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.075);
  font-size: inherit;
  line-height: 1.5;
  text-align: left;
  vertical-align: top;
}

.markdown-body th:first-child,
.markdown-body td:first-child {
  padding-left: 0;
}

.markdown-body th:last-child,
.markdown-body td:last-child {
  padding-right: 0;
}

.markdown-body th {
  color: var(--text);
  font-weight: 680;
  letter-spacing: normal;
  text-transform: none;
  white-space: normal;
  background: transparent;
}

.markdown-body tbody tr {
  transition: none;
}

.markdown-body tbody tr:hover {
  background: transparent;
}

.markdown-body tr:last-child td {
  border-bottom: 0;
}

.markdown-body a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.markdown-external-link-group {
  position: relative;
  display: inline;
  isolation: isolate;
}

.markdown-external-link-group:has(.markdown-link-site:hover),
.markdown-external-link-group:has(.markdown-link-site:focus-visible) {
  z-index: 50;
}

.markdown-body .markdown-external-link {
  --markdown-link-accent: #62a5ff;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.markdown-link-label {
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, currentColor 62%, transparent);
}

.markdown-link-arrow {
  width: 0.74em;
  height: 0.74em;
  margin-left: 0.2em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -0.08em;
  opacity: 0.8;
}

.markdown-link-arrow svg {
  width: 100%;
  height: 100%;
  display: block;
}

.markdown-link-site {
  --markdown-link-site-surface: #202024;
  position: relative;
  min-height: 22px;
  margin-left: 0.42em;
  padding: 3px 8px 3px 5px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
  background: var(--markdown-link-site-surface);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 620;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.markdown-body .markdown-link-site,
.markdown-body .markdown-link-site:hover,
.markdown-body .markdown-link-site:focus-visible {
  text-decoration: none;
}

.markdown-link-site:hover,
.markdown-link-site:focus-visible {
  background: #ffffff;
  color: #171719;
}

.markdown-link-favicon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  display: block;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  opacity: 0;
}

.markdown-link-favicon.is-loaded {
  opacity: 1;
}

.markdown-link-favicon.is-fallback {
  visibility: hidden;
}

.markdown-external-link:hover .markdown-link-label,
.markdown-external-link:focus-visible .markdown-link-label {
  color: var(--markdown-link-accent);
  text-decoration-style: dotted;
  text-decoration-color: currentColor;
}

.markdown-external-link:hover .markdown-link-arrow,
.markdown-external-link:focus-visible .markdown-link-arrow {
  color: var(--markdown-link-accent);
  opacity: 1;
}

.markdown-external-link:focus-visible {
  border-radius: 5px;
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.markdown-link-site:focus-visible {
  outline: none;
}

.markdown-link-preview {
  position: absolute;
  z-index: 40;
  top: calc(100% + 10px);
  left: 0;
  width: max-content;
  max-width: min(420px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 15px 17px 16px;
  border: 0;
  border-radius: 17px;
  display: grid;
  gap: 13px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-3px);
  pointer-events: none;
  background: var(--markdown-link-site-surface);
  box-shadow: 0 16px 44px rgba(0,0,0,0.38);
  color: var(--text);
  text-align: left;
  white-space: normal;
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms step-end;
}

.markdown-link-site[data-markdown-link-preview-state="loaded"]:hover .markdown-link-preview,
.markdown-link-site[data-markdown-link-preview-state="loaded"]:focus-visible .markdown-link-preview,
.markdown-link-site[data-markdown-link-preview-state="fallback"]:hover .markdown-link-preview,
.markdown-link-site[data-markdown-link-preview-state="fallback"]:focus-visible .markdown-link-preview {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 120ms ease, transform 120ms ease, visibility 0s step-start;
}

.markdown-link-preview-source {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 620;
  line-height: 1.2;
  text-decoration: none;
}

.markdown-link-preview-source .markdown-link-favicon {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

.markdown-link-preview-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 620;
  line-height: 1.45;
  overflow-wrap: break-word;
  word-break: normal;
  text-decoration: none;
}

html[data-theme="light"] .markdown-body code {
  background: rgba(0,0,0,0.06);
}

html[data-theme="light"] .markdown-link-site {
  --markdown-link-site-surface: #ececef;
  background: var(--markdown-link-site-surface);
}

html[data-theme="light"] .markdown-link-site:hover,
html[data-theme="light"] .markdown-link-site:focus-visible {
  background: #1d1d1f;
  color: #ffffff;
}

html[data-theme="light"] .markdown-body .markdown-external-link {
  --markdown-link-accent: #1769df;
}

html[data-theme="light"] .markdown-link-preview {
  background: var(--markdown-link-site-surface);
  box-shadow: 0 16px 38px rgba(0,0,0,0.16);
}

html[data-theme="light"] .markdown-body pre,
html[data-theme="light"] .latex-math-block {
  border-color: rgba(0,0,0,0.11);
  background: rgba(0,0,0,0.035);
}

html[data-theme="light"] .markdown-body hr {
  background: rgba(0,0,0,0.16);
}

html[data-theme="light"] .markdown-body th,
html[data-theme="light"] .markdown-body td {
  border-bottom-color: rgba(0,0,0,0.09);
}

html[data-theme="light"] .markdown-body th {
  background: transparent;
}

html[data-theme="light"] .markdown-code-block {
  border: 0;
  background: #f1f1f1;
}

html[data-theme="light"] .markdown-code-mark,
html[data-theme="light"] .markdown-code-language,
html[data-theme="light"] .markdown-code-block code {
  color: #202020;
}

html[data-theme="light"] .markdown-code-copy:hover,
html[data-theme="light"] .markdown-code-copy:focus-visible,
html[data-theme="light"] .markdown-code-copy.copied {
  background: rgba(0,0,0,0.06);
}

html[data-theme="light"] .markdown-code-block pre,
html[data-theme="light"] .markdown-code-block pre:last-child {
  border: 0;
  background: transparent;
}

@media (max-width: 1000px) {
  .hermes-page {
    grid-template-columns: 1fr;
  }
  .hermes-session-panel {
    display: none;
  }
  .content-area.route-hermes,
  .content-area.route-chat {
    height: 100dvh;
  }
}

@media (max-width: 640px) {
  .hermes-prompt-navigator {
    display: none;
  }

  .hermes-chat-shell {
    --hermes-composer-bottom: max(20px, env(safe-area-inset-bottom));
    --hermes-composer-occlusion-h: calc(var(--hermes-composer-bottom) + 113px);
    --hermes-composer-clip-h: calc(var(--hermes-composer-bottom) + 47px);
  }
  .hermes-messages {
    padding: var(--hermes-chat-start-offset, 8px) 14px var(--hermes-scroll-bottom-gap);
    scroll-padding-bottom: var(--hermes-scroll-bottom-gap);
  }
  .hermes-composer {
    width: calc(100% - 24px);
    min-height: 94px;
    padding: 7px;
    column-gap: 7px;
    row-gap: 0;
    grid-template-areas:
      "primary primary primary primary"
      "leading . model trailing";
    bottom: var(--hermes-composer-bottom);
  }
  .hermes-composer.has-attachments {
    grid-template-areas:
      "attachments attachments attachments attachments"
      "primary primary primary primary"
      "leading . model trailing";
  }
  .hermes-composer .hermes-attachment-list {
    order: -2;
  }
  .hermes-composer textarea {
    order: -1;
    flex: 1 0 100%;
    width: 100%;
    height: 38px;
    min-height: 38px;
    padding: 6px 10px 4px;
  }
  .hermes-composer .hermes-model-readonly,
  .hermes-composer .hermes-model-wrap {
    max-width: min(42vw, 160px);
    min-width: 0;
    margin: 0 5px 1px auto;
  }
  .hermes-composer .hermes-model-readonly {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hermes-composer .hermes-model-btn {
    min-width: 0;
    max-width: min(42vw, 160px);
  }
  .hermes-composer .hermes-model-btn-label {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hermes-composer .hermes-send-btn {
    margin: 0 0 1px;
  }
  .hermes-attachment-list,
  .home-hermes-attachment-list {
    padding-left: 6px;
  }
  .hermes-model-label {
    max-width: 54px;
  }
}


/* === Home Hermes prompt-first dashboard === */
.content-area.route-dashboard {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(32px, env(safe-area-inset-bottom));
}

.jiminbox-home.home-hermes-first {
  position: static;
  --home-hermes-rail-max: var(--hermes-content-max);
  --home-hermes-rail-side-room: clamp(32px, 10vw, 120px);
  width: min(var(--home-hermes-rail-max), calc(100% - var(--home-hermes-rail-side-room)));
  max-width: none;
  min-height: calc(100dvh - 118px);
  padding-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-hermes-hero {
  width: 100%;
  flex-direction: column;
  gap: clamp(22px, 4.2vh, 36px);
  padding: 0;
  margin-bottom: 0;
  border-bottom: 0;
  transform: translateY(calc(-3vh + 10px));
}

.home-hermes-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-hermes-first .home-title {
  font-size: 24px;
  line-height: 28px;
  font-weight: 400;
  letter-spacing: normal;
}

.home-hermes-panel {
  width: 100%;
  height: 168px;
  margin-inline: auto;
  overflow: visible;
}

.home-hermes-messages {
  width: 100%;
  max-height: min(46vh, 420px);
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.home-hermes-messages:empty {
  display: none;
  margin-bottom: 0;
}

.home-hermes-empty {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text-faint);
  font-size: 13px;
}

.home-hermes-message {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.home-hermes-message.user {
  align-self: flex-end;
  align-items: flex-end;
}

.home-hermes-message.assistant {
  align-self: flex-start;
  align-items: flex-start;
}

.home-hermes-message-label {
  padding-inline: 4px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 650;
}

.home-hermes-message-bubble {
  min-width: 0;
  max-width: 100%;
  border-radius: 18px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.075);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}

.home-hermes-message.user .home-hermes-message-bubble {
  background: #2a2a2c;
  border: 0;
  color: #f5f5f7;
  line-height: 1.45;
}

.home-hermes-composer {
  --home-composer-control-size: 36px;
  min-height: 52px;
  padding: 8px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "leading primary model trailing";
  align-items: flex-end;
  align-content: end;
  column-gap: 7px;
  row-gap: 0;
  border-radius: 28px;
  background: #212121;
  border: 0;
  box-shadow: none;
  transition: height 210ms cubic-bezier(0.16, 1, 0.3, 1);
}

.home-hermes-composer.is-resizing {
  will-change: height;
  /* The prompt row becomes a dedicated grid row at the first wrap. Anchoring
     the rows to the top during that height transition keeps the first line at
     one visual y-position instead of letting align-content:end pull it down. */
  align-content: start;
}

.home-hermes-composer.has-attachments {
  grid-template-areas:
    "attachments attachments attachments attachments"
    "leading primary model trailing";
}

.home-hermes-composer.is-multiline {
  grid-template-areas:
    "primary primary primary primary"
    "leading . model trailing";
}

.home-hermes-composer.is-multiline.has-attachments {
  grid-template-areas:
    "attachments attachments attachments attachments"
    "primary primary primary primary"
    "leading . model trailing";
}

.home-hermes-prompt-row {
  grid-area: primary;
  min-width: 0;
  min-height: var(--home-composer-control-size);
  flex: 1 1 180px;
  display: flex;
  align-items: flex-end;
  align-self: flex-end;
  gap: 7px;
  text-align: left;
}

.home-hermes-composer.is-multiline .home-hermes-prompt-row {
  width: 100%;
  padding-inline: 10px 8px;
}

.home-hermes-composer.is-multiline .hermes-model-readonly,
.home-hermes-composer.is-multiline .hermes-model-wrap {
  justify-self: end;
}

.home-hermes-input {
  flex: 1;
  min-width: 0;
  min-height: var(--home-composer-control-size);
  position: relative;
  text-align: left;
  height: var(--home-composer-control-size);
  max-height: 132px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 5px 0;
  font: inherit;
  font-size: 16px;
  line-height: 26px;
  font-weight: 400;
  letter-spacing: normal;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-y: hidden;
  overflow-x: hidden;
  scrollbar-width: none;
  align-self: flex-end;
  box-sizing: border-box;
  transition: height 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Keep every home-composer element on one shared bottom control line. */
.home-hermes-composer .home-hermes-attach-btn,
.home-hermes-composer .hermes-model-readonly,
.home-hermes-composer .hermes-model-wrap,
.home-hermes-composer .home-hermes-send {
  height: var(--home-composer-control-size);
  min-height: var(--home-composer-control-size);
  align-self: flex-end;
  margin-top: auto;
  margin-bottom: 0;
  box-sizing: border-box;
}

.home-hermes-composer .home-hermes-attach-btn,
.home-hermes-composer .home-hermes-send {
  width: var(--home-composer-control-size);
}

.home-hermes-composer .hermes-model-readonly,
.home-hermes-composer .hermes-model-wrap {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: normal;
  padding-top: 0;
  padding-bottom: 0;
}

.home-hermes-composer .hermes-model-popover {
  top: calc(100% + 4px);
  bottom: auto;
  transform-origin: 100% 0;
  animation-name: hermes-model-popover-in-below;
}

.home-hermes-composer .home-hermes-send .ui-icon {
  width: 20px;
  height: 20px;
}

.home-hermes-input::-webkit-scrollbar {
  display: none;
}

.home-hermes-input[data-empty="true"]::after {
  content: "무엇이든 물어보세요";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.60);
  pointer-events: none;
}

.home-hermes-composer.has-task-token .home-hermes-input[data-empty="true"]::after {
  display: none;
}

.home-hermes-input:focus-visible {
  outline: 0;
}

.home-hermes-task-token {
  max-width: min(42%, 190px);
  height: 22px;
  min-height: 0;
  margin: 0 8px 0 0;
  vertical-align: middle;
  box-sizing: border-box;
  border: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  background: transparent;
  color: #72aef8;
  font: inherit;
  font-size: inherit;
  line-height: 1;
  transform: translateY(-1px);
  white-space: nowrap;
  cursor: pointer;
}

.home-hermes-task-token[hidden] {
  display: none;
}

.home-hermes-task-token > span:last-child {
  height: 100%;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-hermes-task-token:hover {
  color: #9ac6ff;
}

.home-hermes-task-token:focus-visible,
.home-hermes-action:focus-visible,
.home-hermes-writing-example:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.home-hermes-task-token-icon,
.home-hermes-action-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-hermes-task-token-icon {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.home-obsidian-task-icon {
  width: 100%;
  height: 100%;
  display: inline-block;
  background: currentColor;
  -webkit-mask: url("/static/obsidian-task.svg?v=v402") center / contain no-repeat;
  mask: url("/static/obsidian-task.svg?v=v402") center / contain no-repeat;
}

.home-hermes-action-icon .ui-icon,
.home-hermes-action-icon .brand-logo {
  width: 23px;
  height: 23px;
}

.home-hermes-task-token-icon .ui-icon,
.home-hermes-task-token-icon .brand-logo {
  width: 20px;
  height: 20px;
}

.home-hermes-send {
  grid-area: trailing;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #000000;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
}

.home-hermes-send:hover {
  transform: translateY(-1px);
}

.home-hermes-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.home-hermes-send .ui-icon {
  width: 22px;
  height: 22px;
}

.home-hermes-task-stage {
  position: relative;
  width: min(100%, 320px);
  height: 176px;
  margin: 27px 0 0;
  overflow: visible;
}

.home-hermes-action-row {
  display: contents;
}

.home-hermes-actions,
.home-hermes-writing-examples {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}

.home-hermes-actions {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 120ms cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0s;
}

.home-hermes-writing-examples {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.home-hermes-task-stage.is-writing .home-hermes-actions {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: none;
}

.home-hermes-task-stage.is-writing .home-hermes-writing-examples {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.home-hermes-task-stage.is-hidden .home-hermes-actions,
.home-hermes-task-stage.is-hidden .home-hermes-writing-examples {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.home-hermes-action,
.home-hermes-writing-example {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 0;
  padding: 9px 16px;
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  gap: 14px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: none;
}

.home-hermes-action:hover,
.home-hermes-writing-example:hover {
  background: transparent;
  color: var(--text-dim);
}

.home-hermes-action > span:last-child,
.home-hermes-writing-example > span:last-child,
.home-hermes-action-icon {
  transition: color var(--transition);
}

.home-hermes-action:hover > span:last-child,
.home-hermes-writing-example:hover > span:last-child,
.home-hermes-action:focus-visible > span:last-child,
.home-hermes-writing-example:focus-visible > span:last-child,
.home-hermes-action:hover .home-hermes-action-icon,
.home-hermes-writing-example:hover .home-hermes-action-icon,
.home-hermes-action:focus-visible .home-hermes-action-icon,
.home-hermes-writing-example:focus-visible .home-hermes-action-icon {
  color: var(--text);
}

@keyframes homeHermesTaskItemIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-hermes-task-stage.is-entering .home-hermes-action {
  animation: homeHermesTaskItemIn 420ms cubic-bezier(0.2, 1.15, 0.3, 1) both;
  animation-delay: 170ms;
  will-change: opacity, transform;
}

.home-hermes-task-stage.is-entering .home-hermes-action-row:nth-child(2) .home-hermes-action {
  animation-delay: 225ms;
}

.home-hermes-task-stage.is-entering .home-hermes-action-row:nth-child(3) .home-hermes-action {
  animation-delay: 280ms;
}

@keyframes homeHermesWritingItemIn {
  0% {
    opacity: 0;
    transform: translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-hermes-task-stage.is-writing .home-hermes-writing-example {
  animation: homeHermesWritingItemIn 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: opacity, transform;
}

.home-hermes-task-stage.is-writing .home-hermes-writing-example:nth-child(2) {
  animation-delay: 34ms;
}

.home-hermes-task-stage.is-writing .home-hermes-writing-example:nth-child(3) {
  animation-delay: 68ms;
}

.home-hermes-task-stage.is-writing .home-hermes-writing-example:nth-child(4) {
  animation-delay: 102ms;
}


#home-hermes-status[data-tone="error"] { color: #ffb4b4; }
#home-hermes-status[data-tone="ok"] { color: var(--text-dim); }

.home-hermes-cursor {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  will-change: opacity, transform;
  animation: hermesPulse 1.35s ease-in-out infinite;
}

html[data-theme="light"] .home-hermes-task-token {
  color: #2469bb;
}

html[data-theme="light"] .home-hermes-task-token:hover {
  color: #174d8b;
}

html[data-theme="light"] .home-hermes-action:hover,
html[data-theme="light"] .home-hermes-writing-example:hover {
  background: transparent;
}

html[data-custom-accent="true"] .home-hermes-send,
html[data-custom-accent="true"] .hermes-send-btn {
  background: var(--user-accent-color);
  border-color: var(--user-accent-color);
  color: var(--user-accent-foreground);
}

html[data-custom-accent="true"] .home-hermes-task-token {
  color: var(--user-accent-color);
}

html[data-theme="light"] .home-hermes-composer {
  background: #f4f4f4;
  border: 0;
  box-shadow:
    0 1px 2px rgba(0,0,0,0.10),
    0 6px 18px rgba(0,0,0,0.06);
}

html[data-theme="light"] .hermes-composer textarea,
html[data-theme="light"] .home-hermes-input {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

html[data-theme="light"] .hermes-composer textarea {
  color: #151515;
  caret-color: #151515;
}

html[data-theme="light"] .hermes-composer textarea::placeholder {
  color: rgba(0, 0, 0, 0.54);
  opacity: 1;
}

html[data-theme="light"] .home-hermes-input[data-empty="true"]::after {
  color: rgba(0,0,0,0.54);
}

html[data-theme="light"] .home-hermes-message.user .home-hermes-message-bubble {
  background: #e7e7e5;
  border-color: transparent;
  color: #171717;
}

html[data-theme="light"] .hermes-message-task-mode {
  color: #2469bb;
}


html[data-theme="light"] .hermes-message.assistant .hermes-message-bubble,
html[data-theme="light"] .home-hermes-message.assistant .home-hermes-message-bubble {
  background: transparent;
  border-color: transparent;
}

html[data-theme="light"] .hermes-response-action,
html[data-theme="light"] .hermes-response-action.action-icon-btn {
  border: 0;
  background: transparent;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

html[data-theme="light"] .hermes-response-action:hover,
html[data-theme="light"] .hermes-response-action:focus-visible,
html[data-theme="light"] .hermes-response-action.action-icon-btn:hover,
html[data-theme="light"] .hermes-response-action.action-icon-btn:focus-visible {
  background: transparent;
}

html[data-theme="light"] .hermes-response-action:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.17);
}

html[data-theme="light"] .hermes-response-copy,
html[data-theme="light"] .hermes-response-branch {
  color: #5d5d5d;
}

html[data-theme="light"] .hermes-response-copy:hover,
html[data-theme="light"] .hermes-response-copy:focus-visible,
html[data-theme="light"] .hermes-response-copy.action-icon-btn:hover,
html[data-theme="light"] .hermes-response-copy.action-icon-btn:focus-visible,
html[data-theme="light"] .hermes-response-branch:hover,
html[data-theme="light"] .hermes-response-branch:focus-visible,
html[data-theme="light"] .hermes-response-branch.action-icon-btn:hover,
html[data-theme="light"] .hermes-response-branch.action-icon-btn:focus-visible {
  background: transparent;
  color: #5d5d5d;
}

@media (hover: hover) and (pointer: fine) {
  html[data-theme="light"] .hermes-response-copy:not(:disabled):hover,
  html[data-theme="light"] .hermes-response-branch:not(:disabled):hover {
    background: var(--surface-hover);
  }
}

html[data-theme="light"] .home-hermes-send {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

@media (max-width: 760px) {
  html.dashboard-viewport-locked,
  body.dashboard-viewport-locked {
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.dashboard-viewport-locked {
    position: fixed;
    inset: 0;
  }

  body.dashboard-viewport-locked #app,
  body.dashboard-viewport-locked .app-shell,
  body.dashboard-viewport-locked .shell-body {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .main-area.route-dashboard {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .content-area.route-dashboard {
    width: 100%;
    max-width: none;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0;
    display: block;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .jiminbox-home.home-hermes-first {
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0;
    display: block;
    overflow: hidden;
  }

  .home-hermes-hero {
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    align-items: stretch;
    gap: 0;
    transform: none;
    overflow: hidden;
  }

  .home-hermes-copy {
    display: none;
  }

  .home-hermes-empty {
    align-items: flex-start;
    text-align: left;
  }

  .home-hermes-panel {
    position: absolute;
    z-index: 114;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    max-width: calc(100% - 24px);
    min-width: 0;
    height: auto;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  .home-hermes-messages {
    display: none;
  }

  .home-hermes-composer {
    order: 2;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 104px;
    padding: 10px;
    column-gap: 8px;
    row-gap: 4px;
    grid-template-areas:
      "primary primary primary primary"
      "leading . model trailing";
    border-radius: 30px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.035);
  }

  .home-hermes-composer.has-attachments {
    grid-template-areas:
      "attachments attachments attachments attachments"
      "primary primary primary primary"
      "leading . model trailing";
  }

  .home-hermes-prompt-row {
    order: -2;
    flex: 1 0 100%;
    min-height: 38px;
    padding-inline: 10px 8px;
    align-items: center;
  }

  .home-hermes-input {
    height: 38px;
    min-height: 38px;
    padding: 6px 0;
    font-size: 16px;
    line-height: 26px;
  }

  .home-hermes-input[data-empty="true"]::after {
    content: "Jiminbox에게 물어보세요";
  }

  .home-hermes-composer .home-hermes-attach-btn,
  .home-hermes-composer .home-hermes-send {
    width: 42px;
    height: 42px;
    min-height: 42px;
  }

  .home-hermes-composer .home-hermes-attach-btn {
    margin-right: auto;
    border-radius: 999px;
    background: #303030;
  }

  .home-hermes-composer .hermes-model-readonly,
  .home-hermes-composer .hermes-model-wrap {
    height: 42px;
    min-height: 42px;
    min-width: 0;
    max-width: min(48vw, 220px);
    margin-left: auto;
    margin-right: 0;
  }

  .home-hermes-composer .hermes-model-btn {
    height: 42px;
    min-height: 42px;
    min-width: 0;
    max-width: min(48vw, 220px);
    padding-inline: 14px 11px;
    border-radius: 999px;
    background: #2d2d2d;
  }

  .home-hermes-composer .hermes-model-readonly {
    overflow: hidden;
    text-overflow: ellipsis;
    padding-inline: 14px;
    border-radius: 999px;
    background: #2d2d2d;
  }

  .home-hermes-composer .hermes-model-btn-label {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-hermes-composer .hermes-model-popover {
    top: auto;
    bottom: calc(100% + 8px);
    transform-origin: 100% 100%;
    animation-name: hermes-model-popover-in;
  }

  .home-hermes-composer .home-hermes-send {
    margin-left: 0;
  }

  .home-hermes-actions,
  .home-hermes-writing-examples {
    width: 100%;
  }

  .home-hermes-task-stage {
    order: 1;
    width: calc(100% - 24px);
    height: 168px;
    margin: 0 12px 10px;
    transition: height 160ms ease, margin 160ms ease, opacity 120ms ease;
  }

  .home-hermes-task-stage.is-hidden {
    height: 0;
    margin-bottom: 0;
    opacity: 0;
    pointer-events: none;
  }

  .home-hermes-task-stage.is-writing {
    height: 220px;
  }

  .home-hermes-action-row {
    width: 100%;
    min-height: 52px;
    display: block;
  }

  .home-hermes-action,
  .home-hermes-writing-example {
    min-height: 52px;
    padding: 10px 8px;
    gap: 16px;
    font-size: 16px;
  }

  html[data-theme="light"] .home-hermes-composer .home-hermes-attach-btn,
  html[data-theme="light"] .home-hermes-composer .hermes-model-btn,
  html[data-theme="light"] .home-hermes-composer .hermes-model-readonly {
    background: #e7e7e7;
    color: #202020;
  }

  .home-hermes-task-token {
    max-width: 145px;
  }
}

@media (max-width: 760px) and (max-height: 560px) {
  .home-hermes-task-stage {
    display: none;
  }
}

@media (max-width: 520px) {
  .home-hermes-composer.has-task-token .home-hermes-task-token {
    max-width: 112px;
  }
  .home-hermes-composer.has-task-token .hermes-model-readonly,
  .home-hermes-composer.has-task-token .hermes-model-wrap {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hermes-input,
  .home-hermes-actions,
  .home-hermes-writing-examples,
  .home-hermes-task-stage.is-writing .home-hermes-actions,
  .home-hermes-task-stage.is-writing .home-hermes-writing-examples,
  .home-hermes-task-stage.is-hidden .home-hermes-actions,
  .home-hermes-task-stage.is-hidden .home-hermes-writing-examples {
    transition: none;
  }
  .home-hermes-task-stage.is-writing .home-hermes-writing-example {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .home-hermes-task-stage.is-entering .home-hermes-action {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .home-hermes-cursor {
    animation: none;
    opacity: .65;
    transform: scale(.9);
  }
}

.startup-error-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: var(--bg);
}

.startup-error-card {
  width: min(100%, 460px);
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.startup-error-kicker {
  display: block;
  margin-bottom: 12px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.startup-error-card h1 {
  margin: 0;
  font-size: clamp(24px, 5vw, 34px);
  letter-spacing: -0.045em;
}

.startup-error-card p {
  margin: 14px 0 24px;
  color: var(--text-muted);
  line-height: 1.6;
}

.hermes-connection-form {
  width: 100%;
  display: grid;
  gap: 14px;
}

.hermes-settings-stack {
  width: min(100%, 620px);
  display: grid;
  gap: 14px;
  margin-top: 0;
}

.hermes-settings-section {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}

.hermes-settings-section-header {
  margin-bottom: 10px;
}

.hermes-settings-section-header h4 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  letter-spacing: -0.02em;
}

.hermes-connection-form label,
.hermes-connection-form-label {
  margin: 0;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 650;
}

.hermes-connection-form-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.hermes-connection-form-row .input { width: 100%; }
.hermes-connection-icon-control { min-width: 0; display: flex; align-items: center; gap: 8px; }
.hermes-connection-icon-picker { width: 48px; height: 48px; padding: 0; border: 0; border-radius: 15px; background: transparent; cursor: pointer; }
.hermes-connection-icon-picker:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hermes-connection-icon-preview {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 15px;
  color: var(--text);
  background: var(--surface-2);
}

.hermes-connection-icon-preview .ui-icon {
  width: 22px;
  height: 22px;
}

.hermes-connection-icon-preview img,
.hermes-connection-custom-icon {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hermes-connection-icon-preview img {
  border-radius: inherit;
}

.hermes-connection-icon-remove { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; color: var(--text-dim); background: transparent; cursor: pointer; }
.hermes-connection-icon-remove .ui-icon { width: 16px; height: 16px; }
.hermes-connection-icon-remove:hover,
.hermes-connection-icon-remove:focus-visible { color: var(--text); background: var(--surface-hover); outline: none; }
.hermes-connection-icon-remove[hidden] { display: none; }

.hermes-connection-status {
  margin: 0 0 0 96px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.hermes-connection-status:empty { display: none; }

.hermes-connection-status.error {
  color: var(--red);
}

.hermes-connection-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.hermes-connections-list {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.hermes-settings-connections .hermes-connections-list {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

#settings-pane-hermes .settings-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hermes-connection-add-button {
  width: 32px;
  height: 32px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: var(--text-dim);
  background: transparent;
  cursor: pointer;
}

.hermes-connection-add-button:hover,
.hermes-connection-add-button:focus-visible {
  color: var(--text);
  background: var(--surface-hover);
  outline: none;
}

.hermes-connection-add-button .ui-icon { width: 20px; height: 20px; }

.hermes-connections-empty {
  margin: 0;
  padding: 12px 2px;
  color: var(--text-dim);
  font-size: 12px;
}

.hermes-connections-empty.error {
  color: var(--red);
}

.hermes-connection-item {
  min-width: 0;
  min-height: 52px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 11px;
  row-gap: 0;
  padding: 9px 8px;
  border-radius: 14px;
  background: transparent;
  transition: background-color 150ms ease;
}

.hermes-connection-item.active,
.hermes-connection-item.editing {
  background: var(--surface-hover);
}

.hermes-connection-selectable {
  cursor: pointer;
}

.hermes-connection-selectable:hover,
.hermes-connection-selectable:focus-visible {
  background: var(--surface-hover);
  outline: none;
}

.hermes-connection-item-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  color: var(--text);
  background: var(--surface-2);
}

button.hermes-connection-item-icon {
  appearance: none;
  padding: 0;
  border: 0;
  font: inherit;
  cursor: pointer;
  transition: background-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

button.hermes-connection-item-icon:not(:disabled):hover {
  background: var(--surface-hover);
  transform: scale(1.04);
}

button.hermes-connection-item-icon:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hermes-connection-item-icon .brand-logo,
.hermes-connection-item-icon .ui-icon {
  width: 18px;
  height: 18px;
}

.hermes-connection-custom-icon {
  border-radius: inherit;
}

.hermes-connection-item-main {
  min-width: 0;
  display: block;
}

.hermes-connection-item-main strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hermes-connection-item-main strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 680;
}

.hermes-connection-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.hermes-connection-active-label {
  padding: 0 6px;
  color: var(--text-dim);
  font-size: 11px;
  white-space: nowrap;
}

.hermes-connection-delete {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}

.hermes-connection-edit {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: var(--text-dim);
  background: transparent;
  cursor: pointer;
}

.hermes-connection-edit .ui-icon { width: 17px; height: 17px; }

.hermes-connection-edit:hover,
.hermes-connection-edit:focus-visible {
  color: var(--text);
  background: var(--surface-hover);
  outline: none;
}

.hermes-connection-delete .ui-icon {
  width: 17px;
  height: 17px;
}

.hermes-connection-delete:hover,
.hermes-connection-delete:focus-visible {
  color: #ff6961;
  background: rgba(255,105,97,0.10);
  outline: none;
}

.hermes-connection-item button:disabled,
.hermes-connection-form :disabled {
  opacity: 0.48;
  cursor: wait;
}

@media (max-width: 720px) {
  .hermes-connection-form-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 7px;
  }

  .hermes-connection-status { margin-left: 0; }

  .hermes-connection-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .hermes-connection-item-icon {
    grid-column: 1;
    grid-row: 1;
  }

  .hermes-connection-item-main {
    grid-column: 2;
    grid-row: 1;
  }

  .hermes-connection-item-actions {
    grid-column: 2;
    justify-content: flex-start;
    margin-top: 11px;
  }

}

.login-minimal-page {
  min-height: 100dvh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  background: #000000;
  color: #f5f5f7;
}

.login-minimal {
  width: min(100%, 340px);
  text-align: center;
}

.login-minimal h1 {
  margin: 0 0 30px;
  text-align: center;
  font-size: clamp(38px, 8vw, 52px);
  font-weight: 760;
  line-height: 1;
  letter-spacing: -0.065em;
}

.login-minimal p {
  margin: 14px 0 32px;
  color: #8e8e93;
  font-size: 14px;
}

.login-minimal-action {
  min-height: 52px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  background: #f5f5f7;
  color: #050505;
  text-decoration: none;
  font-size: 14px;
  font-weight: 680;
  transition: opacity 160ms ease, transform 160ms ease;
}

.login-minimal-action:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.login-minimal-action:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.login-minimal-action svg {
  width: 18px;
  height: 18px;
}

html[data-theme="light"] .login-minimal-page {
  background: #f7f7f4;
  color: #111111;
}

html[data-theme="light"] .login-minimal p {
  color: #6e6e73;
}

html[data-theme="light"] .login-minimal-action {
  border-color: #111111;
  background: #111111;
  color: #ffffff;
}

.main-area.route-roon {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.content-area.route-roon {
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-y: contain;
  overscroll-behavior-x: none;
  -webkit-overflow-scrolling: touch;
}

.main-area.route-roon > .roon-import-dock {
  position: absolute;
  left: 0;
  right: 0;
  top: auto;
  bottom: max(38px, env(safe-area-inset-bottom));
}

.content-area.route-roon,
.content-area.route-roon-requests {
  max-width: none;
  padding: 0;
  font-family: "Square Sans Text VF", "Square Sans Text", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.roon-minimal {
  --roon-page-gutter: clamp(22px, 4vw, 56px);
  --roon-content-rail-max: 1202px;
  --roon-content-edge-space: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 100dvh;
  margin: 0;
  padding: clamp(40px, 6vw, 72px) var(--roon-page-gutter) max(56px, env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-x: clip;
}

.roon-minimal:not(.roon-history-view) {
  padding-bottom: max(140px, calc(env(safe-area-inset-bottom) + 112px));
}

@media (min-width: 1600px) {
  .roon-minimal {
    max-width: 1312px;
    margin-inline: auto;
  }
}

.roon-minimal-head,
.roon-shelf,
.roon-minimal-jobs {
  width: min(100%, var(--roon-content-rail-max));
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
}

.roon-minimal-head,
.roon-minimal-jobs {
  padding-inline: var(--roon-content-edge-space);
}

.roon-minimal-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  padding-bottom: 30px;
  border-bottom: 0;
}

.roon-minimal.is-initial-loading .roon-minimal-head {
  padding-bottom: 0;
}

.roon-minimal-title {
  min-width: 0;
  display: flex;
  align-items: center;
  color: var(--text);
}

.roon-minimal-title .roon-wordmark {
  width: clamp(124px, 16vw, 154px);
  height: clamp(41px, 5.4vw, 51px);
  display: block;
  vertical-align: 0;
}

.roon-import-dock {
  position: fixed;
  z-index: 115;
  left: var(--sidebar-w);
  right: 0;
  bottom: max(38px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  pointer-events: none;
  transform: translateZ(0);
  will-change: transform;
  transition: left var(--sidebar-transition-duration) var(--sidebar-transition-easing);
}

body.sidebar-collapsed .roon-import-dock {
  left: var(--sidebar-collapsed-w);
}

@media (max-width: 900px) {
  .roon-import-dock,
  body.sidebar-collapsed .roon-import-dock {
    left: 0;
    right: 0;
  }
}

.roon-minimal-error {
  margin: 18px 0 0;
  color: var(--red);
  font-size: 12px;
}

.roon-import-line {
  --roon-url-input-inline-space: 12px;
  width: min(var(--hermes-content-max), calc(100% - clamp(32px, 10vw, 120px)));
  min-height: 52px;
  margin: 0;
  padding: 8px;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  flex-wrap: wrap;
  border-radius: 28px;
  background: rgba(29,29,31,0.76);
  border: 0;
  box-shadow:
    0 14px 42px rgba(0,0,0,0.34),
    inset 0 0 0 1px rgba(255,255,255,0.12),
    inset 0 1px 0 rgba(255,255,255,0.035);
  backdrop-filter: blur(20px) saturate(1.16);
  -webkit-backdrop-filter: blur(20px) saturate(1.16);
  font-family: -apple-system-body, ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  font-weight: normal;
  pointer-events: auto;
  transition: width 180ms ease;
}

.roon-import-line input {
  height: 36px;
  min-height: 36px;
  min-width: 0;
  flex: 1;
  box-sizing: border-box;
  padding: 5px var(--roon-url-input-inline-space);
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 26px;
  text-align: left;
}

.roon-import-line input::placeholder {
  color: rgba(255,255,255,0.60);
  opacity: 1;
}

.roon-shelf {
  --roon-shelf-edge-space: var(--roon-content-edge-space);
  margin-bottom: 48px;
  container-type: inline-size;
}

.roon-shelf[hidden] {
  display: none;
}

.roon-shelf > .roon-section-heading {
  padding-inline: var(--roon-shelf-edge-space);
}

.roon-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  min-height: 28px;
  margin-bottom: 17px;
}

.roon-section-heading h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-family: "Square Sans Display VF", "Square Sans Display", Helvetica, Arial, sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 26px;
  letter-spacing: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roon-shelf-controls {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.roon-shelf-scroll {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #171717;
  color: rgba(255,255,255,0.72);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.roon-shelf-scroll:hover:not(:disabled) {
  background: #242424;
  color: #ffffff;
}

.roon-shelf-scroll:active:not(:disabled) {
  transform: scale(0.95);
}

.roon-shelf-scroll:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.roon-shelf-scroll:disabled {
  opacity: 0.3;
  cursor: default;
}

.roon-shelf-scroll .ui-icon {
  width: 17px;
  height: 17px;
}

.roon-shelf-scroll[data-roon-shelf-scroll="-1"] .ui-icon {
  transform: rotate(180deg);
}

.roon-jobs-view-all {
  padding: 0;
  display: inline-flex;
  align-items: center;
  border: 0;
  outline: 0;
  background: transparent;
  color: rgba(255,255,255,0.55);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  text-decoration: none;
  cursor: pointer;
}

.roon-jobs-view-all:hover {
  color: var(--text);
}

.roon-jobs-view-all:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 4px;
  border-radius: 2px;
}

.roon-jobs-view-all:disabled {
  cursor: default;
  opacity: 0.55;
}

.roon-shelf-grid {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: min(222px, calc((100% - 64px) / 5));
  justify-content: start;
  gap: 16px;
  padding-inline: var(--roon-shelf-edge-space);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  scroll-padding-inline: var(--roon-shelf-edge-space);
  scroll-snap-type: x mandatory;
}

@container (min-width: 1080px) {
  .roon-shelf-grid {
    grid-auto-columns: calc((100% - 80px) / 6);
  }
}

@container (min-width: 1200px) {
  .roon-shelf-grid {
    grid-auto-columns: calc((100% - 96px) / 7);
  }
}

.roon-shelf-grid::-webkit-scrollbar {
  display: none;
}

.roon-shelf-card {
  min-width: 0;
  display: block;
  color: inherit;
  text-decoration: none;
  scroll-snap-align: start;
}

.roon-shelf-card:last-child {
  scroll-snap-align: end;
}

.roon-shelf-artwork {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  contain: paint;
  border-radius: 5px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.015)),
    var(--roon-artwork-color, var(--surface-hover));
  color: var(--text-faint);
  box-shadow: 0 16px 40px rgba(0,0,0,0.20);
}

.roon-shelf-artwork::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid rgba(255,255,255,0.055);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.roon-shelf-card[data-kind="artist"] {
  text-align: center;
}

.roon-shelf-card[data-kind="artist"] .roon-shelf-artwork {
  width: min(200px, 100%);
  margin-inline: auto;
  border-radius: 50%;
  box-shadow: 0 16px 40px rgba(0,0,0,0.15);
}

.roon-shelf-artwork img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 180ms ease;
}

.roon-shelf-artwork.image-error img {
  display: none;
}

.roon-shelf-artwork-fallback {
  position: relative;
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 640;
  line-height: 1;
}

.roon-shelf-artwork.has-artwork .roon-shelf-artwork-fallback,
.roon-job-artwork.has-artwork .roon-job-artwork-fallback {
  display: none;
}

.roon-shelf-card:hover .roon-shelf-artwork img,
.roon-shelf-card:focus-visible .roon-shelf-artwork img {
  filter: brightness(0.84);
}

.roon-shelf-card:focus-visible {
  outline: 0;
}

.roon-shelf-card:focus-visible .roon-shelf-artwork {
  box-shadow:
    0 0 0 2px var(--focus-ring),
    0 16px 40px rgba(0,0,0,0.20);
}

.roon-shelf-title,
.roon-shelf-subtitle {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roon-shelf-title {
  margin-top: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: normal;
}

.roon-shelf-card[data-kind="artist"] .roon-shelf-title {
  margin-top: 8px;
  text-align: center;
}

.roon-shelf-subtitle {
  margin-top: 0;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: normal;
}

.roon-minimal-jobs {
  margin-top: 4px;
}

.roon-minimal-jobs .roon-job-row:hover,
.roon-minimal-jobs .roon-job-row:focus-within {
  background: var(--surface-hover);
}

.roon-history-head,
.roon-history-jobs {
  width: calc(100% - max(0px, 4vw - var(--roon-page-gutter)));
}

.roon-history-head {
  min-height: 38px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

.roon-history-head h1 {
  margin: 0;
  color: var(--text);
  font-family: "Square Sans Display VF", "Square Sans Display", Helvetica, Arial, sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 38px;
  letter-spacing: normal;
}

.roon-history-view .roon-job-row {
  border-radius: 2px;
}

.roon-history-view .roon-job-row:hover,
.roon-history-view .roon-job-row:focus-within {
  background: var(--surface-hover);
}

.roon-job-list-head,
.roon-job-row {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 55px minmax(180px, 300px) minmax(140px, 251px) minmax(110px, 1fr) 80px 80px;
  align-items: center;
}

.roon-job-list-head {
  min-height: 26px;
  color: #afafb6;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.roon-job-list-head > span {
  min-width: 0;
  padding: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roon-job-list-head > span:nth-child(2) {
  padding-left: 8px;
}

.roon-job-row {
  min-height: 54px;
  border: 0;
  transition: background-color 140ms ease;
}

.roon-job-artwork {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  contain: paint;
  margin-left: 3px;
  border-radius: 2px;
  background: var(--roon-artwork-color, var(--surface-hover));
  color: var(--text-faint);
}

.roon-job-artwork-link {
  width: 42px;
  height: 42px;
  display: block;
  margin-left: 3px;
  border-radius: 2px;
  color: inherit;
  text-decoration: none;
}

.roon-job-artwork-link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.roon-job-artwork-link .roon-job-artwork {
  width: 100%;
  height: 100%;
  margin-left: 0;
}

.roon-job-artwork[data-kind="artist"] {
  border-radius: 2px;
}

.roon-job-artwork img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.roon-job-artwork.image-error img {
  display: none;
}

.roon-job-artwork-fallback {
  position: relative;
  font-size: 17px;
  font-weight: 680;
  line-height: 1;
}

.roon-job-copy {
  min-width: 0;
  padding: 4px 10px 4px 8px;
}

.roon-job-copy .subject-title,
.roon-job-copy .subject-subtitle {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roon-job-copy .subject-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.roon-job-copy .subject-subtitle {
  display: none;
}

.roon-job-facts {
  display: contents;
}

.roon-job-artist,
.roon-job-type {
  min-width: 0;
  padding: 4px 10px 4px 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roon-job-state {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px 0 3px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

button.roon-job-state[data-status="failed"] {
  cursor: pointer;
}

button.roon-job-state[data-status="failed"] .roon-job-status {
  border-radius: 50%;
  transition: opacity 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

button.roon-job-state[data-status="failed"]:hover .roon-job-status {
  opacity: 0.72;
}

button.roon-job-state[data-status="failed"]:active .roon-job-status {
  transform: scale(0.92);
}

button.roon-job-state[data-status="failed"]:focus-visible {
  outline: none;
}

button.roon-job-state[data-status="failed"]:focus-visible .roon-job-status {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus-ring);
}

.roon-job-artist,
.roon-job-type,
.roon-job-row time {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roon-job-row time {
  min-width: max-content;
  padding: 4px 10px 4px 3px;
  overflow: visible;
  text-overflow: clip;
  font-variant-numeric: tabular-nums;
}

.roon-job-status {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: block;
  overflow: visible;
  color: var(--text);
  fill: none;
  stroke: none;
  shape-rendering: geometricPrecision;
}

.roon-job-status-surface {
  fill: currentColor;
  stroke: none;
}

.roon-job-status-glyph {
  fill: none;
  stroke: var(--bg);
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.roon-job-status[data-icon="failure"] .roon-job-status-surface {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
}

.roon-job-status[data-icon="failure"] .roon-job-status-glyph {
  stroke: currentColor;
  stroke-width: 1.9;
}

.roon-job-status[data-status="running"],
.roon-job-status[data-status="pending"],
.roon-job-status[data-status="accepted"] {
  color: var(--text);
  transform-origin: center;
  animation: roon-status-spin 1.6s linear infinite;
}

.roon-job-status[data-status="completed"] {
  color: var(--text);
}

.roon-job-status[data-status="failed"] {
  color: var(--text);
}

.modal-overlay.roon-failure-overlay {
  padding: 16px;
  background: rgba(0,0,0,0.72);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.modal.roon-failure-modal {
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  width: min(460px, calc(100vw - 32px));
  max-width: 460px;
  background: #303030;
  box-shadow: 0 20px 60px rgba(0,0,0,0.42);
  color: #f2f2f2;
  font-family: inherit;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: searchApiDialogIn 0.16s cubic-bezier(0.2, 0, 0, 1);
}

.roon-failure-modal .modal-header {
  display: block;
  padding: 22px 24px 12px;
  border-bottom: 0;
}

.roon-failure-modal .modal-title {
  color: #f2f2f2;
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  letter-spacing: normal;
}

.roon-failure-modal .modal-body {
  padding: 3px 24px 0;
}

.roon-failure-modal .roon-failure-reason {
  margin: 0;
  color: #d2d2d2;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: normal;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.roon-failure-modal .roon-failure-status {
  margin: 8px 0 0;
  color: #ff8a8a;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  overflow-wrap: anywhere;
}

.roon-failure-modal .roon-failure-status:empty {
  display: none;
}

.roon-failure-modal .modal-footer {
  justify-content: flex-end;
  padding: 24px 24px 22px;
  border-top: 0;
}

.roon-failure-modal .modal-footer .btn {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #494949;
  color: #f2f2f2;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: normal;
  box-shadow: none;
  transform: none;
}

.roon-failure-modal .modal-footer .btn:disabled {
  background: #3b3b3b;
  color: #777777;
  cursor: default;
  opacity: 1;
}

.roon-failure-modal .modal-footer .btn:hover,
.roon-failure-modal .modal-footer .btn:focus-visible {
  border: 0;
  background: #555555;
  color: #ffffff;
  outline: none;
  transform: none;
}

.roon-failure-modal .modal-footer .btn:disabled:hover,
.roon-failure-modal .modal-footer .btn:disabled:focus-visible {
  background: #3b3b3b;
  color: #777777;
}

@media (max-width: 520px) {
  .roon-failure-modal .modal-header {
    padding: 20px 20px 12px;
  }

  .roon-failure-modal .modal-body {
    padding: 3px 20px 0;
  }

  .roon-failure-modal .roon-failure-reason {
    font-size: 15px;
    line-height: 22px;
  }

  .roon-failure-modal .modal-footer {
    padding: 22px 20px 20px;
  }

  .roon-failure-modal .modal-footer .btn {
    min-height: 40px;
  }
}

.roon-job-status-track {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  opacity: 0.2;
}

.roon-job-status-progress {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-dasharray: 68 32;
  stroke-dashoffset: 6;
}

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

@media (prefers-reduced-motion: reduce) {
  .roon-job-status[data-status="running"],
  .roon-job-status[data-status="pending"],
  .roon-job-status[data-status="accepted"] {
    animation: none;
  }
}

.roon-job-row time {
  margin: 0;
  text-align: left;
  white-space: nowrap;
}

.roon-minimal-state {
  margin: 24px 0;
  color: var(--text-faint);
  font-size: 12px;
}

html[data-theme="light"] .roon-import-line {
  background: rgba(244,244,244,0.78);
  border: 0;
  box-shadow:
    0 14px 38px rgba(35,35,30,0.16),
    inset 0 0 0 1px rgba(0,0,0,0.10),
    inset 0 1px 0 rgba(255,255,255,0.52);
}

html[data-theme="light"] .roon-import-line input {
  color: #151515;
  caret-color: #151515;
}

html[data-theme="light"] .roon-import-line input::placeholder {
  color: rgba(0, 0, 0, 0.54);
  opacity: 1;
}

html[data-theme="light"] .roon-shelf-scroll {
  background: #ececea;
  color: rgba(0,0,0,0.62);
}

html[data-theme="light"] .roon-shelf-scroll:hover:not(:disabled) {
  background: #e2e2df;
  color: #111111;
}

html[data-theme="light"] .roon-jobs-view-all {
  color: rgba(0,0,0,0.55);
}

html[data-theme="light"] .roon-jobs-view-all:hover {
  color: var(--text);
}

@media (max-width: 760px) {
  .roon-minimal {
    min-height: 100%;
    padding-top: 72px;
  }
  .roon-minimal-title .roon-wordmark {
    width: 116px;
    height: 39px;
  }
  .roon-shelf {
    width: 100%;
    margin-bottom: 42px;
  }
  .roon-section-heading h2 {
    font-size: 19px;
  }
  .roon-shelf-controls {
    gap: 6px;
  }
  .roon-shelf-scroll {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }
  .roon-shelf-grid {
    grid-auto-columns: calc((100% - 16px) / 2);
    margin-right: 0;
    padding-inline: var(--roon-shelf-edge-space);
  }
  .roon-shelf-card[data-kind="artist"] .roon-shelf-artwork {
    width: 100%;
  }
  .roon-job-list-head {
    display: none;
  }
  .roon-job-row {
    min-height: 64px;
    grid-template-columns: 42px minmax(0, 1fr) max-content;
    grid-template-rows: 20px 18px;
    align-content: center;
    gap: 2px 12px;
    padding: 5px 0;
  }
  .roon-job-artwork,
  .roon-job-artwork-link {
    grid-column: 1;
    grid-row: 1 / 3;
    margin-left: 0;
  }
  .roon-job-copy {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
  }
  .roon-job-artist {
    grid-column: 2;
    grid-row: 2;
    padding: 0;
    color: var(--text-dim);
    font-size: 12px;
    line-height: 18px;
  }
  .roon-job-type {
    display: none;
  }
  .roon-job-row time {
    grid-column: 3;
    grid-row: 1;
    padding: 0;
    justify-self: end;
    text-align: right;
  }
  .roon-job-state {
    grid-column: 3;
    grid-row: 2;
    justify-content: flex-end;
    padding: 0;
  }
}

@media (max-width: 640px) {
  .main-area.route-roon > .roon-import-dock {
    top: auto;
    bottom: max(20px, env(safe-area-inset-bottom));
  }

  .roon-import-line {
    width: calc(100% - 24px);
    min-height: 94px;
    padding: 7px;
    column-gap: 7px;
    row-gap: 0;
  }

  .roon-import-line input {
    order: -1;
    flex: 1 0 100%;
    width: 100%;
    height: 38px;
    min-height: 38px;
    padding: 6px var(--roon-url-input-inline-space) 4px;
  }

  .roon-import-line .hermes-send-btn {
    margin: 0 0 1px auto;
  }
}

/* Unified single-surface settings dialog. */
.settings-overlay {
  background: rgba(0,0,0,0.56);
  backdrop-filter: none;
  transition-duration: 150ms;
}

.settings-overlay .settings-modal {
  transform: translateY(8px) scale(0.99);
  transition-duration: 150ms;
}

.settings-overlay.open .settings-modal {
  transform: translateY(0) scale(1);
}

.settings-modal {
  width: min(680px, calc(100vw - 32px));
  height: min(600px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  border-color: rgba(255,255,255,0.10);
  border-radius: 16px;
  background: #212121;
  box-shadow: 0 24px 72px rgba(0,0,0,0.46);
}

.settings-layout {
  grid-template-columns: 180px minmax(0, 1fr);
}

.settings-sidebar {
  padding: 0 8px 16px;
  gap: 2px;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
}

.settings-rail-header {
  min-height: 54px;
  padding: 0 7px;
  display: flex;
  align-items: center;
}

.settings-rail-header h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.settings-close {
  position: static;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  backdrop-filter: none;
}

.settings-close .ui-icon {
  width: 20px;
  height: 20px;
}

.settings-modal .ui-icon [stroke] {
  stroke-width: 1.8;
}

.settings-close .ui-icon [stroke] {
  stroke-width: 2;
}

.settings-close:hover,
.settings-close:focus-visible {
  background: #2f2f2f;
  color: var(--text);
  outline: none;
}

.settings-tablist {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-nav-item {
  min-height: 40px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.settings-nav-item:hover,
.settings-nav-item:focus-visible {
  background: #292929;
  color: var(--text);
  outline: none;
}

.settings-nav-item.active {
  background: #2f2f2f;
  color: var(--text);
  font-weight: 500;
}

.settings-panel {
  padding: 32px 24px 32px 16px;
  background: transparent;
}

.settings-pane-header {
  margin: 0;
  padding: 0 0 20px;
  border: 0;
  border-bottom: 1px solid var(--border);
}

.settings-pane-header h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -0.015em;
}

.settings-modal .settings-line strong,
.settings-modal .appearance-accent-copy strong,
.settings-modal .appearance-sidebar-name-copy label,
.settings-modal .appearance-favicon-main strong,
.settings-modal .appearance-background-main strong {
  font-weight: 500;
}

.settings-nav-icon,
.settings-line-icon,
.subscription-plan-icon {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: currentColor;
}

.settings-nav-icon {
  width: 18px;
  height: 18px;
}

.settings-nav-icon .ui-icon,
.settings-nav-icon .brand-logo {
  width: 18px;
  height: 18px;
  vertical-align: 0;
  stroke-width: 1.7;
}

.settings-list-card,
.subscription-plan-card,
.subscription-detail-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.settings-line,
.subscription-plan-card {
  min-height: 70px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.settings-line-value {
  max-width: 58%;
  margin-left: auto;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.4;
  text-align: right;
  overflow-wrap: anywhere;
}

.settings-line:last-child {
  border-bottom: 0;
}

.settings-choice {
  position: relative;
  margin-left: auto;
}

.settings-choice-trigger {
  min-width: 108px;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.settings-choice-trigger:hover,
.settings-choice-trigger:focus-visible {
  background: transparent;
  color: var(--text);
  outline: none;
}

.settings-choice-trigger:focus-visible {
  outline: 1px solid var(--border-light);
  outline-offset: 2px;
}

.settings-choice-caret {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: currentColor;
  transition: transform 140ms ease;
}

.settings-choice-trigger[aria-expanded="true"] .settings-choice-caret {
  transform: rotate(180deg);
}

.settings-choice-caret .ui-icon {
  width: 18px;
  height: 18px;
}

.settings-choice-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: -8px;
  z-index: 30;
  width: 200px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: #303030;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.42);
}

.settings-choice-menu[hidden] {
  display: none;
}

.settings-choice-option {
  width: 100%;
  min-height: 48px;
  padding: 0 12px 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
  cursor: pointer;
}

.settings-choice-option:hover,
.settings-choice-option:focus-visible {
  background: rgba(255, 255, 255, 0.075);
  outline: none;
}

.settings-choice-check {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  visibility: hidden;
}

.settings-choice-check .ui-icon {
  width: 18px;
  height: 18px;
}

.settings-choice-option[aria-selected="true"] .settings-choice-check {
  visibility: visible;
}

.settings-archived-chats-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.settings-manage-button {
  min-width: 58px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 20px;
  cursor: pointer;
}

.settings-manage-button:hover,
.settings-manage-button:focus-visible {
  border-color: var(--text-faint);
  background: rgba(255,255,255,0.07);
  outline: none;
}

.modal-overlay.hermes-archive-overlay {
  z-index: 610;
  background: rgba(0,0,0,0.42);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hermes-archive-modal {
  width: min(620px, calc(100vw - 32px));
  height: min(470px, calc(100dvh - 48px));
  max-width: 620px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  background: #212121;
  box-shadow: 0 24px 72px rgba(0,0,0,0.46);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hermes-archive-header {
  min-height: 64px;
  padding: 0 18px 0 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hermes-archive-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -0.015em;
}

.hermes-archive-close,
.hermes-archive-restore {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.hermes-archive-close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 8px;
}

.hermes-archive-close .ui-icon {
  width: 20px;
  height: 20px;
}

.hermes-archive-list {
  min-height: 0;
  flex: 1;
  padding: 10px 14px 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.hermes-archive-state {
  box-sizing: border-box;
  min-height: 100%;
  margin: 0;
  padding: 32px 20px;
  color: var(--text-dim);
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 14px;
}

.hermes-archive-state.error {
  color: #ff6961;
}

.hermes-archive-row {
  min-height: 58px;
  padding: 0 8px 0 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hermes-archive-row:last-child {
  border-bottom: 0;
}

.hermes-archive-row-title {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 20px;
}

.hermes-archive-restore {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 8px;
}

.hermes-archive-restore .ui-icon {
  width: 20px;
  height: 20px;
}

.hermes-archive-close:hover,
.hermes-archive-close:focus-visible,
.hermes-archive-restore:hover,
.hermes-archive-restore:focus-visible {
  background: #2f2f2f;
  color: var(--text);
  outline: none;
}

.hermes-archive-restore:disabled {
  opacity: 0.42;
  cursor: wait;
}

#settings-pane-general .settings-list-card {
  overflow: visible;
}

.account-detail-line .settings-line-main,
.account-logout-row .settings-line-main {
  gap: 0;
}

.account-profile-control,
.account-plan-value {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.account-profile-control .profile-avatar-btn {
  width: 52px;
  height: 52px;
}

.account-profile-control .profile-editor-avatar {
  width: 52px;
  height: 52px;
  font-size: 18px;
}

.account-profile-control .profile-avatar-action {
  right: -3px;
  bottom: -1px;
  width: 22px;
  height: 22px;
  border-width: 1px;
}

.account-profile-control .profile-avatar-action .ui-icon {
  width: 12px;
  height: 12px;
}

.account-plan-value strong {
  color: var(--text);
  font-size: 15px;
}

.account-plan-value span {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.2;
}

.account-storage-line .settings-line-main,
.account-storage-content {
  width: 100%;
}

.account-storage-content {
  display: grid;
  gap: 9px;
}

.account-storage-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.account-storage-heading small {
  flex: 0 0 auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.account-storage-track {
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
}

.account-storage-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 220ms ease;
}

html[data-theme="light"] .account-storage-track {
  background: rgba(0,0,0,0.12);
}

.account-logout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.account-logout-btn {
  flex: 0 0 auto;
  border-radius: 999px;
  color: #ff6961;
  background: transparent;
  border: 1px solid rgba(255,105,97,0.30);
}

.account-logout-btn:hover,
.account-logout-btn:focus-visible {
  color: #ff857f;
  background: rgba(255,105,97,0.10);
  outline: none;
}

.appearance-sidebar-name-card {
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.9fr);
  align-items: center;
  gap: 8px 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.appearance-accent-card {
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.appearance-accent-copy {
  min-width: 0;
}

.appearance-accent-copy strong,
.appearance-accent-copy small {
  display: block;
}

.appearance-accent-copy strong {
  color: var(--text);
  font-size: 14px;
}

.appearance-accent-copy small {
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.4;
}

.appearance-accent-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.appearance-accent-control input[type="color"] {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  box-sizing: border-box;
  aspect-ratio: 1;
  padding: 3px;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  background: var(--surface-2);
  overflow: hidden;
  cursor: pointer;
}

.appearance-accent-control input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.appearance-accent-control input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 50%;
}

.appearance-accent-control input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 50%;
}

.appearance-accent-control .btn {
  min-height: 34px;
  border-radius: 999px;
}

.appearance-accent-control :disabled {
  opacity: 0.45;
  cursor: default;
}

.appearance-preference-status {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
  color: var(--text-dim);
  font-size: 11px;
}

.appearance-preference-status[data-tone="error"] {
  color: #ff6961;
}

.appearance-sidebar-name-copy {
  min-width: 0;
}

.appearance-sidebar-name-copy label,
.appearance-sidebar-name-copy small {
  display: block;
}

.appearance-sidebar-name-copy label {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.appearance-sidebar-name-copy small {
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.4;
}

.appearance-sidebar-name-control {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.appearance-sidebar-name-control .input {
  min-width: 0;
}

.appearance-sidebar-name-control .btn {
  min-height: 36px;
  border-radius: 999px;
}

.appearance-sidebar-name-status {
  grid-column: 2;
  min-height: 18px;
  margin: 0;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.4;
}

.appearance-sidebar-name-status[data-tone="error"] {
  color: #ff6961;
}

.appearance-favicon-card {
  min-height: 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.appearance-favicon-preview {
  width: 88px;
  aspect-ratio: 1 / 1;
  padding: 0;
  justify-self: center;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: var(--surface-2);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.appearance-favicon-preview:hover,
.appearance-background-preview:hover {
  border-color: var(--text-faint);
  outline: none;
}

.appearance-favicon-preview:focus-visible,
.appearance-background-preview:focus-visible {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.appearance-favicon-preview:disabled,
.appearance-background-preview:disabled {
  opacity: 0.45;
  cursor: wait;
}

.appearance-favicon-preview img {
  width: 100%;
  height: 100%;
  padding: 9px;
  display: block;
  object-fit: contain;
}

.appearance-favicon-preview span {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
}

.appearance-favicon-main {
  min-width: 0;
}

.appearance-favicon-main strong,
.appearance-favicon-main small {
  display: block;
}

.appearance-favicon-main strong {
  color: var(--text);
  font-size: 14px;
}

.appearance-favicon-main small {
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.4;
}

.appearance-favicon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.appearance-favicon-actions .btn:disabled {
  opacity: 0.45;
  cursor: wait;
  pointer-events: none;
}

.appearance-favicon-actions .btn,
.appearance-background-actions .btn,
.hermes-settings-stack .btn {
  min-height: 34px;
  border-radius: 999px;
}

.appearance-favicon-status {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 11px;
}

.appearance-favicon-status[data-tone="error"] {
  color: #ff6961;
}

.appearance-background-card {
  min-height: 104px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

#settings-pane-appearance .appearance-chat-background-card {
  border-bottom: 0;
}

.appearance-background-preview {
  width: 104px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: var(--surface-2);
  color: var(--text-faint);
  padding: 0;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}

.appearance-background-preview :is(img, video) {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.appearance-background-preview-home :is(img, video) {
  filter: brightness(var(--home-background-brightness, 100%));
}

.appearance-background-preview-chat :is(img, video) {
  filter: brightness(var(--chat-background-brightness, 100%));
}

.appearance-background-main {
  min-width: 0;
}

.appearance-background-main strong,
.appearance-background-main small {
  display: block;
}

.appearance-background-main strong {
  color: var(--text);
  font-size: 14px;
}

.appearance-background-main small {
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.4;
}

.appearance-background-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.appearance-brightness-control {
  margin-top: 12px;
  display: grid;
  grid-template-columns: auto minmax(96px, 1fr) 42px;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 11px;
}

.appearance-brightness-control input[type="range"] {
  width: 100%;
  accent-color: var(--user-accent-color, currentColor);
}

.appearance-brightness-control input[type="range"]:disabled {
  opacity: 0.38;
  cursor: default;
}

.appearance-brightness-control output {
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.appearance-background-actions .btn:disabled {
  opacity: 0.45;
  cursor: wait;
  pointer-events: none;
}

.appearance-background-status {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 11px;
}

.appearance-background-status[data-tone="error"] {
  color: #ff6961;
}

/* Keep visible controls centered between dividers. Empty live regions used to
   reserve a blank line below their row, which made the actual content look
   top-aligned even though the card itself used centered grid alignment. */
#settings-pane-appearance .appearance-accent-card,
#settings-pane-appearance .appearance-sidebar-name-card {
  align-content: center;
}

#settings-pane-appearance .appearance-preference-status:empty,
#settings-pane-appearance .appearance-sidebar-name-status:empty,
#settings-pane-appearance .appearance-favicon-status:empty,
#settings-pane-appearance .appearance-background-status:empty {
  display: none;
}

.hermes-settings-section {
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.hermes-settings-section:last-child {
  border-bottom: 0;
}

.hermes-settings-connections:not(.has-form-open) {
  border-bottom-color: transparent;
}

.hermes-settings-connections:has(#hermes-connection-form-section.is-inline),
.hermes-health-section:has(+ #hermes-connection-form-anchor) {
  border-bottom-color: transparent;
}

.hermes-health-section:has(+ #hermes-connection-form-anchor + #hermes-connection-form-section:not([hidden])) {
  border-bottom-color: var(--border);
}

.hermes-connection-item > #hermes-connection-form-section.is-inline {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  padding: 0 4px 0 45px;
  border: 0 !important;
  background: transparent;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    grid-template-rows 190ms cubic-bezier(0.16, 1, 0.3, 1),
    padding 190ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 130ms ease,
    transform 190ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hermes-connection-item > #hermes-connection-form-section.is-inline.is-expanded {
  grid-template-rows: 1fr;
  padding: 18px 4px 4px 45px;
  opacity: 1;
  transform: translateY(0);
}

.hermes-connection-item > #hermes-connection-form-section.is-inline.is-closing {
  pointer-events: none;
}

#hermes-connection-form-section.is-inline .hermes-settings-section-header {
  display: none;
}

#hermes-connection-form-section.is-inline .hermes-connection-form {
  min-height: 0;
  overflow: hidden;
  gap: 10px;
}

#hermes-connection-form-section.is-inline .hermes-connection-form-row {
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
}

#hermes-connection-form-section.is-inline .hermes-connection-status {
  margin-left: 76px;
}

#hermes-connection-form-section.is-inline .hermes-connection-actions {
  margin-top: 2px;
}

@media (max-width: 720px) {
  .hermes-connection-item > #hermes-connection-form-section.is-inline {
    grid-column: 1 / -1;
    padding: 0;
  }

  .hermes-connection-item > #hermes-connection-form-section.is-inline.is-expanded {
    padding: 19px 0 4px;
  }

  #hermes-connection-form-section.is-inline .hermes-connection-form-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  #hermes-connection-form-section.is-inline .hermes-connection-status {
    margin-left: 0;
  }
}

@media (pointer: coarse) {
  .hermes-connection-edit {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hermes-connection-item > #hermes-connection-form-section.is-inline {
    transition: none;
  }
}

.hermes-health-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hermes-health-overall,
.hermes-health-name {
  display: inline-flex;
  align-items: center;
}

.hermes-health-overall {
  gap: 7px;
  color: var(--text-dim);
  font-size: 12px;
  white-space: nowrap;
}

.hermes-health-overall > span,
.hermes-health-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--text-faint);
}

.hermes-health-overall[data-tone="ready"] > span,
.hermes-health-dot[data-tone="ready"] {
  background: #31c96b;
}

.hermes-health-overall[data-tone="warning"] > span,
.hermes-health-dot[data-tone="warning"] {
  background: #ff9f0a;
}

.hermes-health-overall[data-tone="error"] > span,
.hermes-health-dot[data-tone="error"] {
  background: #ff6961;
}

.hermes-health-checks {
  margin-top: 10px;
}

.hermes-health-row {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--text-dim);
  font-size: 13px;
}

.hermes-health-name {
  gap: 9px;
  color: var(--text);
}

.hermes-health-row small {
  color: var(--text-dim);
  font-size: 12px;
  text-align: right;
}

.hermes-health-empty {
  margin: 0;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.55;
}

.hermes-health-empty.error {
  color: #ff6961;
}

html[data-theme="light"] .settings-modal {
  background: #ffffff;
}

html[data-theme="light"] .settings-sidebar,
html[data-theme="light"] .settings-panel {
  background: transparent;
}

html[data-theme="light"] .settings-list-card,
html[data-theme="light"] .subscription-plan-card,
html[data-theme="light"] .subscription-detail-card,
html[data-theme="light"] .profile-editor,
html[data-theme="light"] .hermes-settings-section {
  border-color: var(--border);
  background: transparent;
  box-shadow: none;
}

html[data-theme="light"] .hermes-settings-connections:not(.has-form-open) {
  border-bottom-color: transparent;
}

html[data-theme="light"] .subscription-plan-icon,
html[data-theme="light"] .settings-line-icon:not(.danger) {
  border-color: transparent;
  background: transparent;
}

html[data-theme="light"] .settings-close {
  background: transparent;
  color: #4b4b4f;
}

html[data-theme="light"] .settings-close:hover,
html[data-theme="light"] .settings-close:focus-visible {
  background: #ececea;
}

html[data-theme="light"] .settings-choice-trigger {
  color: #171717;
}

html[data-theme="light"] .settings-choice-trigger:hover,
html[data-theme="light"] .settings-choice-trigger:focus-visible {
  background: transparent;
}

html[data-theme="light"] .settings-choice-menu {
  border-color: rgba(0, 0, 0, 0.1);
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .settings-choice-option {
  color: #171717;
}

html[data-theme="light"] .settings-choice-option:hover,
html[data-theme="light"] .settings-choice-option:focus-visible {
  background: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .settings-manage-button:hover,
html[data-theme="light"] .settings-manage-button:focus-visible {
  background: rgba(0,0,0,0.06);
}

html[data-theme="light"] .hermes-archive-modal {
  border-color: rgba(0,0,0,0.12);
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(0,0,0,0.24);
}

html[data-theme="light"] .hermes-archive-close:hover,
html[data-theme="light"] .hermes-archive-close:focus-visible,
html[data-theme="light"] .hermes-archive-restore:hover,
html[data-theme="light"] .hermes-archive-restore:focus-visible {
  background: #ececea;
}

@media (max-width: 720px) {
  .settings-modal {
    width: calc(100vw - 12px);
    height: calc(100dvh - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 16px;
  }

  .settings-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .settings-sidebar {
    padding: 0 8px 8px;
    flex-direction: column;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .settings-rail-header {
    min-height: 54px;
    padding: 0 7px;
  }

  .settings-close {
    width: 36px;
    height: 36px;
  }

  .settings-tablist {
    flex-direction: row;
    overflow-x: auto;
  }

  .settings-nav-item {
    width: auto;
    height: 40px;
    min-height: 40px;
    min-width: max-content;
    margin-top: 0;
    padding: 0 12px;
  }

  .settings-panel {
    padding: 24px 18px;
  }

  .settings-line-value {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-top: 6px;
    font-size: 13px;
    text-align: left;
  }

  .appearance-sidebar-name-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .appearance-accent-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .appearance-accent-control {
    justify-content: flex-start;
  }

  .appearance-sidebar-name-status {
    grid-column: 1;
  }

  .appearance-background-card {
    grid-template-columns: minmax(0, 1fr) 88px;
    gap: 14px;
  }

  .appearance-favicon-card {
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 14px;
  }

  .appearance-favicon-preview {
    width: 72px;
  }

  .appearance-background-preview {
    width: 88px;
  }

  .account-logout-row {
    align-items: center;
  }

  .account-settings-card .settings-line {
    flex-direction: row;
    align-items: center;
  }

  .account-profile-control,
  .account-plan-value,
  .account-detail-line .settings-line-value {
    width: auto;
    max-width: 58%;
    margin: 0 0 0 auto;
    text-align: right;
  }

  .hermes-archive-modal {
    width: calc(100vw - 20px);
    height: min(520px, calc(100dvh - 20px));
  }

  .hermes-archive-header {
    padding-left: 18px;
  }
}

html[data-theme="light"] .sidebar-recent .sidebar-section-label,
html[data-theme="light"] .sidebar-recent-toggle,
html[data-theme="light"] .sidebar-collapse-btn,
html[data-theme="light"] .sidebar-recent-menu-btn {
  color: #161616;
}

html[data-theme="light"] .sidebar-recent-item,
html[data-theme="light"] .sidebar-recent-title {
  color: #151515;
}

html[data-theme="light"] .sidebar-recent-row.response-ready .sidebar-recent-title {
  color: #151515;
}

html[data-theme="light"] .sidebar-recent-row.active,
html[data-theme="light"] .sidebar-recent-row.active:hover,
html[data-theme="light"] .sidebar-recent-row.active:focus-within {
  background: #e7e7e4;
}

html[data-theme="light"] .sidebar-recent-row.active .sidebar-recent-item,
html[data-theme="light"] .sidebar-recent-row.active .sidebar-recent-item:hover,
html[data-theme="light"] .sidebar-recent-row.active .sidebar-recent-item:focus-visible,
html[data-theme="light"] .sidebar-recent-row.active .sidebar-recent-menu-btn {
  color: #151515;
}

html[data-theme="light"] .nav-item.active,
html[data-theme="light"] .nav-item.active:hover,
html[data-theme="light"] .nav-item.active:focus-visible {
  color: #151515;
  background: #e7e7e4;
}

html[data-theme="light"] .settings-nav-item:hover,
html[data-theme="light"] .settings-nav-item:focus-visible {
  background: #f2f2ef;
}

html[data-theme="light"] .settings-nav-item.active {
  background: #ececea;
  color: #171717;
}

html[data-theme="light"] .mobile-menu-btn {
  background: transparent;
  color: #171717;
}

html[data-theme="light"] .mobile-menu-btn:hover {
  background: transparent;
}

@media (max-width: 900px) {
  .content-area.route-services {
    padding-top: max(70px, calc(env(safe-area-inset-top) + 58px));
  }

  .content-area.route-integrations .search-api-workbench,
  .content-area.route-integrations-claude-web-search .search-api-workbench,
  .content-area.route-integrations-firecrawl .search-api-workbench,
  .content-area.route-roon .roon-minimal,
  .content-area.route-roon-requests .roon-minimal {
    padding-top: max(76px, calc(env(safe-area-inset-top) + 64px));
  }

  .content-area.route-integrations .search-api-workbench,
  .content-area.route-integrations-claude-web-search .search-api-workbench,
  .content-area.route-integrations-firecrawl .search-api-workbench {
    min-height: calc(100dvh - 18px - max(28px, env(safe-area-inset-bottom)));
  }
}

@media (max-width: 600px) {
  .content-area.route-integrations .search-api-workbench,
  .content-area.route-integrations-claude-web-search .search-api-workbench,
  .content-area.route-integrations-firecrawl .search-api-workbench {
    min-height: calc(100dvh - 28px);
  }
}

/* Theme-neutral tiles let each product's own color remain the visual accent. */
.service-apps-directory .service-app-icon:not(.risu) {
  --service-icon-bg: rgba(255,255,255,0.065);
  --service-icon-fg: var(--text);
  --service-icon-border: rgba(255,255,255,0.11);
}

html[data-theme="light"] .service-apps-directory .service-app-icon {
  --service-icon-bg: #ffffff;
  --service-icon-fg: #161616;
  --service-icon-border: rgba(0,0,0,0.14);
  border-color: var(--service-icon-border);
}

html[data-theme="light"] .service-apps-directory .service-app-icon.hermes .hermes-agent-color-logo {
  filter: invert(1);
}

/* Improvement 141: these monochrome marks share the neutral dark tile. */
.service-apps-directory .service-app-icon.jiminbox-portal,
.service-apps-directory .service-app-icon.vpn,
.service-apps-directory .service-app-icon.plex,
.service-apps-directory .service-app-icon.roon {
  --service-icon-bg: rgba(255,255,255,0.065);
  --service-icon-border: rgba(255,255,255,0.11);
}

.service-apps-directory .service-app-icon.jiminbox-portal {
  --service-icon-fg: #FFFFFF;
}

.service-apps-directory .service-app-icon.opencloud {
  --service-icon-bg: rgba(255,255,255,0.065);
  --service-icon-fg: var(--brand-cloud-icon);
  --service-icon-border: rgba(255,255,255,0.11);
}

.service-apps-directory .service-app-icon.vpn {
  --service-icon-fg: #F4F4F5;
}

.service-apps-directory .service-app-icon.plex {
  --service-icon-fg: #EBAF00;
}

.service-apps-directory .service-app-icon.roon {
  --service-icon-fg: #FFFFFF;
}

/* Custom photos keep every service mark on one quiet, translucent surface. */
html[data-custom-background="true"]:not([data-theme="light"]) .service-apps-directory .service-app-icon {
  --service-icon-bg: rgba(255,255,255,0.085);
  --service-icon-border: rgba(255,255,255,0.14);
}

html[data-theme="light"] .service-apps-directory .service-app-icon.plex {
  --service-icon-fg: #EBAF00;
}

html[data-theme="light"] .service-apps-directory .service-app-icon.roon {
  --service-icon-fg: #3A3A3A;
}

.service-apps-directory .service-app-icon.fns {
  --service-icon-bg: rgba(255,255,255,0.075);
}

/* RisuAI uses the same neutral tile surface as the other service marks. */
.service-apps-directory .service-app-icon.risu {
  --service-icon-bg: rgba(255,255,255,0.065);
  --service-icon-fg: var(--text);
  --service-icon-border: rgba(255,255,255,0.11);
}

/* Improvement 73: invitation, guided onboarding, and operator surfaces. */
.login-minimal-actions {
  width: min(100%, 280px);
  margin-inline: auto;
  display: grid;
  gap: 10px;
}

.login-minimal-action-secondary {
  background: transparent;
  color: #f5f5f7;
}

html[data-theme="light"] .login-minimal-action-secondary {
  background: transparent;
  color: #111111;
}

.signup-minimal {
  width: min(100%, 390px);
  text-align: left;
}

.signup-minimal h1 {
  margin: 28px 0 10px;
  text-align: left;
  font-size: clamp(34px, 8vw, 46px);
}

.signup-minimal > p {
  margin: 0 0 28px;
  line-height: 1.55;
}

.signup-back-link {
  color: #a1a1a6;
  font-size: 13px;
  text-decoration: none;
}

.signup-back-link:hover,
.signup-back-link:focus-visible {
  color: currentColor;
  text-decoration: underline;
  outline: none;
}

.signup-invite-form {
  display: grid;
  gap: 10px;
}

.signup-invite-form label {
  color: #a1a1a6;
  font-size: 12px;
  font-weight: 650;
}

.signup-invite-form input {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  background: rgba(255,255,255,0.055);
  color: #f5f5f7;
  font: 14px ui-monospace, "SF Mono", Menlo, monospace;
  outline: none;
}

.signup-invite-form input:focus {
  border-color: rgba(255,255,255,0.4);
}

.signup-form-status {
  min-height: 20px;
  margin: 0;
  color: #a1a1a6;
  font-size: 12px;
  line-height: 1.5;
}

html[data-theme="light"] .signup-invite-form input {
  border-color: rgba(0,0,0,0.14);
  background: rgba(0,0,0,0.035);
  color: #111111;
}

.content-area.route-onboarding,
.content-area.route-admin,
.content-area.route-admin-users,
.content-area.route-admin-services {
  max-width: none;
  padding: 0;
}

.onboarding-page,
.admin-console {
  width: min(100%, 960px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(64px, 9vw, 108px) clamp(22px, 6vw, 68px) max(64px, env(safe-area-inset-bottom));
}

.onboarding-head,
.admin-console-head {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.onboarding-kicker,
.admin-console-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.onboarding-head h1,
.admin-console-head h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.onboarding-head p,
.admin-console-head p {
  max-width: 660px;
  margin: 12px 0 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}

.onboarding-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 42px;
  padding-top: 34px;
}

.onboarding-key-panel,
.onboarding-progress-panel,
.admin-section {
  min-width: 0;
}

.onboarding-section-title,
.admin-section-title {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 18px;
  letter-spacing: -0.03em;
}

.onboarding-section-copy,
.admin-section-copy {
  margin: 0 0 20px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.55;
}

.onboarding-new-api-form {
  display: grid;
  gap: 10px;
}

.onboarding-new-api-form label {
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 650;
}

.onboarding-new-api-form .input {
  min-height: 50px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.onboarding-form-actions,
.admin-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
}

.onboarding-page .btn,
.onboarding-guide-actions .btn {
  border-radius: 999px;
}

.onboarding-submit-button {
  min-width: 142px;
  justify-content: center;
}

.onboarding-submit-spinner {
  display: none;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.onboarding-submit-button.is-loading .onboarding-submit-spinner {
  display: inline-block;
  animation: onboarding-spin 0.75s linear infinite;
}

.onboarding-inline-status {
  min-height: 21px;
  margin: 2px 0 0;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.5;
}

.onboarding-inline-status[data-tone="error"] {
  color: #ff6961;
}

.onboarding-progress-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.onboarding-progress-item {
  position: relative;
  min-height: 55px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 15px;
}

.onboarding-progress-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 23px;
  bottom: 0;
  width: 1px;
  background: var(--border-light);
}

.onboarding-progress-mark {
  position: relative;
  z-index: 1;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-faint);
}

.onboarding-progress-mark .ui-icon {
  width: 13px;
  height: 13px;
}

.onboarding-progress-item[data-state="complete"] .onboarding-progress-mark {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.onboarding-progress-item[data-state="active"] .onboarding-progress-mark {
  border-color: var(--text);
  color: var(--text);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.onboarding-progress-item[data-state="active"] .onboarding-progress-mark::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: onboarding-spin 0.75s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .onboarding-submit-button.is-loading .onboarding-submit-spinner,
  .onboarding-progress-item[data-state="active"] .onboarding-progress-mark::before {
    animation: none;
  }
}

.onboarding-progress-item[data-state="failed"] .onboarding-progress-mark {
  border-color: #ff6961;
  color: #ff6961;
}

.onboarding-progress-copy strong,
.onboarding-progress-copy small {
  display: block;
}

.onboarding-progress-copy strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.onboarding-progress-copy small {
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.onboarding-retry-row {
  margin-top: 12px;
}

.onboarding-guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0,0,0,0.56);
  backdrop-filter: blur(22px) saturate(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.08);
}

.onboarding-guide-dialog {
  width: min(100%, 620px);
  max-height: min(760px, calc(100dvh - 44px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 28px;
  background: rgba(18,18,19,0.96);
  box-shadow: var(--shadow-lg);
}

.onboarding-guide-head,
.onboarding-guide-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}

.onboarding-guide-head {
  border-bottom: 1px solid var(--border);
}

.onboarding-guide-actions {
  border-top: 1px solid var(--border);
}

.onboarding-guide-head strong {
  color: var(--text);
  font-size: 14px;
}

.onboarding-guide-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}

.onboarding-guide-close:hover,
.onboarding-guide-close:focus-visible {
  background: var(--surface-hover);
  color: var(--text);
  outline: none;
}

.onboarding-guide-body {
  overflow-y: auto;
  padding: clamp(24px, 6vw, 42px);
}

.onboarding-guide-step {
  min-height: 280px;
  display: grid;
  align-content: center;
  justify-items: start;
}

.onboarding-guide-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: var(--surface-hover);
  color: var(--text);
}

.onboarding-guide-icon .brand-logo,
.onboarding-guide-icon .ui-icon {
  width: 30px;
  height: 30px;
}

.onboarding-guide-step h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 5vw, 34px);
  letter-spacing: -0.05em;
}

.onboarding-guide-step p {
  max-width: 500px;
  margin: 13px 0 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.65;
}

.onboarding-guide-open-new-api {
  margin-top: 24px;
}

.onboarding-guide-progress {
  display: flex;
  align-items: center;
  gap: 6px;
}

.onboarding-guide-progress span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--text-faint);
}

.onboarding-guide-progress span.active {
  width: 18px;
  background: var(--text);
}

.onboarding-guide-nav {
  display: flex;
  gap: 8px;
}

html[data-theme="light"] .onboarding-guide-dialog {
  background: rgba(255,255,255,0.97);
}

.persistent-key-modal[aria-hidden="true"] {
  display: none;
}

.admin-console {
  width: min(100%, 1120px);
}

.admin-console-head {
  padding-bottom: 18px;
  border-bottom: 0;
}

.admin-page-nav {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.admin-page-nav-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 620;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition), box-shadow var(--transition);
}

.admin-page-nav-link:hover,
.admin-page-nav-link:focus-visible {
  color: var(--text);
  background: var(--surface-hover);
  outline: none;
}

.admin-page-nav-link:focus-visible {
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.admin-page-nav-link[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
  border-color: transparent;
  box-shadow: none;
}

.admin-page-nav-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-page-nav-icon .ui-icon {
  width: 17px;
  height: 17px;
}

.admin-section {
  padding: 25px 0;
  border-top: 0;
}

.admin-usage-surface {
  margin-top: 18px;
}

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

.admin-usage-metric {
  min-width: 0;
  padding: 3px 20px 3px 0;
}

.admin-usage-metric + .admin-usage-metric {
  padding-left: 20px;
  border-left: 1px solid var(--border);
}

.admin-usage-metric dt {
  color: var(--text-dim);
  font-size: 12px;
}

.admin-usage-metric dd {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
}

.admin-usage-note {
  margin: 14px 0 0;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.55;
}

.admin-usage-group {
  margin-top: 34px;
}

.admin-usage-group h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.admin-usage-table .admin-number-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.admin-model-usage-table {
  max-width: 760px;
}

.admin-invite-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 150px auto;
  gap: 9px;
  align-items: center;
}

.admin-section-title + .admin-invite-form {
  margin-top: 16px;
}

.admin-form-field {
  display: grid;
  gap: 0;
}

.admin-form-field label {
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 650;
}

.admin-form-field .input,
.admin-form-field select {
  min-height: 42px;
}

.pill-select {
  position: relative;
  min-width: 0;
}

.pill-select-trigger {
  position: relative;
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 42px 0 16px;
  font: inherit;
  line-height: 1;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.pill-select-trigger .ui-icon {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--text-dim);
  transform: translateY(-50%);
  transition: transform var(--transition);
}

.pill-select.open .pill-select-trigger .ui-icon {
  transform: translateY(-50%) rotate(180deg);
}

.pill-select-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 80;
  width: max(100%, 180px);
  max-height: min(260px, 45vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: #303032;
  box-shadow: 0 18px 46px rgba(0,0,0,0.42);
}

.pill-select-menu[hidden] {
  display: none;
}

.pill-select-option {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.pill-select-option:hover,
.pill-select-option:focus-visible,
.pill-select-option[aria-selected="true"] {
  background: rgba(255,255,255,0.12);
  color: var(--text);
  outline: none;
}

html[data-theme="light"] .pill-select-menu {
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(25,25,20,0.16);
}

html[data-theme="light"] .pill-select-option:hover,
html[data-theme="light"] .pill-select-option:focus-visible,
html[data-theme="light"] .pill-select-option[aria-selected="true"] {
  background: rgba(0,0,0,0.075);
}

.admin-invite-submit {
  min-height: 42px;
  justify-content: center;
  padding-inline: 20px;
  border-radius: 999px;
  white-space: nowrap;
}

.admin-state-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.admin-state-badge[data-state="READY"],
.admin-state-badge[data-state="ACTIVE"],
.admin-state-badge[data-state="active"] {
  color: var(--text);
  border-color: var(--border-light);
}

.admin-state-badge[data-state="FAILED_RETRYABLE"],
.admin-state-badge[data-state="FAILED"],
.admin-state-badge[data-state="failed"] {
  color: #ff6961;
  border-color: rgba(255,105,97,0.4);
}

.admin-table-wrap {
  width: calc(100% + 28px);
  max-width: none;
  margin-inline: -14px;
  padding-inline: 14px;
  overflow-x: auto;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
}

.admin-table th,
.admin-table td {
  padding: 16px 12px;
  text-align: left;
  vertical-align: middle;
  line-height: 1.45;
}

.admin-table thead th {
  border-bottom: 0;
}

.admin-table tbody tr:not(:last-child) td {
  border-bottom: 1px solid var(--border);
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table tbody tr {
  background: transparent;
  transition: none;
}

.admin-table tbody td {
  transition: none;
}

.admin-table tbody tr:hover td,
.admin-table tbody tr:has(:focus-visible) td {
  background: var(--surface-hover);
  border-bottom-color: transparent;
}

.admin-table tbody tr:hover td:first-child,
.admin-table tbody tr:has(:focus-visible) td:first-child,
.admin-table tbody tr:hover td:last-child,
.admin-table tbody tr:has(:focus-visible) td:last-child {
  position: relative;
  border-radius: 0;
}

.admin-table tbody tr:hover td:first-child::before,
.admin-table tbody tr:has(:focus-visible) td:first-child::before,
.admin-table tbody tr:hover td:last-child::after,
.admin-table tbody tr:has(:focus-visible) td:last-child::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  background: var(--surface-hover);
  pointer-events: none;
}

.admin-table tbody tr:hover td:first-child::before,
.admin-table tbody tr:has(:focus-visible) td:first-child::before {
  left: -14px;
  border-radius: 14px 0 0 14px;
}

.admin-table tbody tr:hover td:last-child::after,
.admin-table tbody tr:has(:focus-visible) td:last-child::after {
  right: -14px;
  border-radius: 0 14px 14px 0;
}

.admin-table th {
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.admin-table td {
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 450;
}

.admin-table td strong {
  color: var(--text);
  font-weight: 600;
}

.admin-table td small {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.4;
}

.admin-table .cell-mono {
  font-family: inherit;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.admin-table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.admin-icon-button {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
}

.admin-icon-button:hover,
.admin-icon-button:focus-visible {
  color: #ff6961;
  background: rgba(255,105,97,0.1);
  outline: none;
}

.admin-icon-button:focus-visible {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.24);
}

.admin-icon-button:disabled {
  opacity: 0.4;
  cursor: default;
}

.admin-icon-button .ui-icon {
  width: 17px;
  height: 17px;
}

.admin-status-indicator {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.admin-status-mark {
  width: 8px;
  height: 8px;
  display: block;
  border: 1.5px solid var(--text-faint);
  border-radius: 50%;
  box-sizing: border-box;
}

.admin-status-indicator[data-tone="ready"] .admin-status-mark {
  border-color: #31c96b;
  background: #31c96b;
}

.admin-status-indicator[data-tone="running"] .admin-status-mark {
  border-color: var(--text);
  background: var(--text);
}

.admin-status-indicator[data-tone="progress"] .admin-status-mark {
  border-color: #ff9f0a;
  background: #ff9f0a;
}

.admin-status-indicator[data-tone="error"] .admin-status-mark {
  border-color: #ff6961;
  background: #ff6961;
}

.admin-status-indicator[data-tone="idle"] .admin-status-mark,
.admin-status-indicator[data-tone="unavailable"] .admin-status-mark {
  border-color: var(--text-faint);
  background: transparent;
}

.admin-status-indicator[data-tone="absent"] .admin-status-mark {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1;
}

.admin-user-identity {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.admin-user-identity .admin-status-indicator {
  width: 16px;
  height: 16px;
}

.admin-service-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.admin-service-icon .brand-logo,
.admin-service-icon .ui-icon {
  width: 21px;
  height: 21px;
}

html[data-theme="light"] .admin-service-icon .hermes-agent-color-logo {
  filter: invert(1);
}

.admin-runtime-unavailable {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  color: var(--text-faint);
  font-size: 11px;
}

.admin-service-user-groups { border-top: 1px solid var(--border); }
.admin-service-user-group { display: grid; grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1.45fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.admin-service-user-head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 9px 0; }
.admin-service-user-head > span:first-child { min-width: 0; display: grid; gap: 4px; }
.admin-service-user-head strong { color: var(--text); font-size: 15px; font-weight: 620; }
.admin-service-user-head small { overflow: hidden; color: var(--text-faint); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-service-user-plan { flex: 0 0 auto; color: var(--text-faint); font-size: 12px; }
.admin-service-user-items { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.admin-service-user-item { min-width: 0; min-height: 64px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 24px; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: rgba(255,255,255,0.035); }
.admin-service-user-item-link { color: inherit; cursor: pointer; text-decoration: none; transition: background var(--transition), box-shadow var(--transition); }
.admin-service-user-item-link:hover { background: rgba(255,255,255,0.075); }
.admin-service-user-item-link:focus-visible { outline: 2px solid var(--accent-color, #7aa2ff); outline-offset: 2px; }
.admin-service-user-item-copy { min-width: 0; display: grid; gap: 3px; }
.admin-service-user-item-copy strong { color: var(--text); font-size: 13px; font-weight: 600; }
.admin-service-user-item-copy small { overflow: hidden; color: var(--text-faint); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme="light"] .admin-service-user-item { background: rgba(0,0,0,0.035); }
html[data-theme="light"] .admin-service-user-item-link:hover { background: rgba(0,0,0,0.065); }

.admin-manage-button:hover,
.admin-manage-button:focus-visible {
  color: var(--text);
  background: var(--surface-hover);
}

.admin-manage-button .ui-icon {
  width: 18px;
  height: 18px;
}

.admin-user-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  justify-content: flex-end;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.15s ease;
}

.admin-user-drawer {
  width: min(780px, calc(100vw - 24px));
  height: 100dvh;
  overflow: hidden;
  border-left: 1px solid var(--border-light);
  background: #202123;
  box-shadow: -18px 0 50px rgba(0,0,0,0.32);
  animation: adminDrawerIn 0.2s ease;
}

html[data-theme="light"] .admin-user-drawer {
  background: #ffffff;
  box-shadow: -18px 0 50px rgba(24,24,24,0.16);
}

@keyframes adminDrawerIn {
  from { transform: translateX(18px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.admin-user-drawer-layout { height: 100%; display: grid; grid-template-columns: 220px minmax(0, 1fr); overflow: hidden; }
.admin-user-drawer-rail { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: max(14px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom)); border-right: 1px solid var(--border); }
.admin-user-drawer-head { display: grid; gap: 16px; padding: 0 6px 18px; }
.admin-user-drawer-head h2 { margin: 0; color: var(--text); font-size: 20px; letter-spacing: -0.03em; }
.admin-user-drawer-head p { margin: 5px 0 0; color: var(--text-faint); font-size: 12px; overflow-wrap: anywhere; }
.admin-user-drawer-close { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; background: #2b2b2d; color: var(--text-dim); }
.admin-user-drawer-close:hover, .admin-user-drawer-close:focus-visible { background: #363638; color: var(--text); }
.admin-user-drawer-close .ui-icon { width: 24px; height: 24px; }
.admin-user-drawer-identity { min-width: 0; }
.admin-user-drawer-tablist { min-height: 0; display: flex; flex: 1; flex-direction: column; gap: 4px; }
.admin-user-drawer-nav-item { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 11px; padding: 0 14px; border: 0; border-radius: 14px; background: transparent; color: var(--text-dim); font: inherit; font-size: 14px; font-weight: 560; text-align: left; cursor: pointer; }
.admin-user-drawer-nav-item:hover, .admin-user-drawer-nav-item:focus-visible { background: #29292b; color: var(--text); outline: none; }
.admin-user-drawer-nav-item.active { background: #343436; color: var(--text); font-weight: 620; }
.admin-user-drawer-nav-icon { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; }
.admin-user-drawer-nav-icon .ui-icon { width: 20px; height: 20px; }
.admin-user-drawer-panels { min-width: 0; overflow-y: auto; padding: max(28px, env(safe-area-inset-top)) 36px max(36px, env(safe-area-inset-bottom)); }
.admin-user-drawer-pane-head { margin-bottom: 4px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.admin-user-drawer-pane-head h3 { margin: 0; color: var(--text); font-size: 26px; letter-spacing: -0.035em; }
.admin-lifecycle-group { display: grid; gap: 10px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.admin-lifecycle-group:last-child { border-bottom: 0; }
.admin-lifecycle-label { color: var(--text); font-size: 14px; font-weight: 620; letter-spacing: -0.01em; }
.admin-lifecycle-hint { margin: 0; color: var(--text-muted); font-size: 12px; line-height: 1.45; }
.admin-lifecycle-buttons, .admin-redeploy-options { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-redeploy-options label { min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text-dim); font-size: 12px; cursor: pointer; }
.admin-redeploy-options input { accent-color: var(--text); }
.admin-lifecycle-danger { color: #ff6961; border-color: rgba(255,105,97,0.32); }
html[data-theme="light"] .admin-user-drawer-close { background: #e7e7e4; color: #4b4b4f; }
html[data-theme="light"] .admin-user-drawer-close:hover, html[data-theme="light"] .admin-user-drawer-close:focus-visible { background: #ddddda; }
html[data-theme="light"] .admin-user-drawer-nav-item:hover, html[data-theme="light"] .admin-user-drawer-nav-item:focus-visible { background: #f0f0ed; }
html[data-theme="light"] .admin-user-drawer-nav-item.active { background: #e7e7e4; color: #171717; }

.admin-key-modal {
  width: min(760px, calc(100vw - 32px));
  max-width: 760px;
}

.admin-key-modal .modal-body {
  max-height: min(68vh, 620px);
  overflow-y: auto;
}

.admin-empty,
.admin-loading {
  padding: 20px 0;
  color: var(--text-dim);
  font-size: 13px;
}

@media (max-width: 820px) {
  .onboarding-layout {
    grid-template-columns: 1fr;
  }

  .admin-invite-form {
    grid-template-columns: 1fr 1fr;
  }

  .admin-invite-form .admin-form-field:first-child,
  .admin-invite-submit {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .content-area.route-onboarding,
  .content-area.route-admin,
  .content-area.route-admin-users,
  .content-area.route-admin-services,
  .content-area.route-admin-usage {
    padding-top: max(58px, env(safe-area-inset-top));
  }

  .onboarding-page,
  .admin-console {
    padding: 34px 20px max(42px, env(safe-area-inset-bottom));
  }

  .onboarding-guide-overlay {
    padding: 0;
  }

  .onboarding-guide-dialog {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .onboarding-guide-step {
    min-height: 0;
  }

  .admin-invite-form {
    grid-template-columns: 1fr;
  }

  .admin-invite-form .admin-form-field:first-child,
  .admin-invite-submit {
    grid-column: auto;
  }

  .admin-invite-table {
    min-width: 680px;
  }

  .admin-user-table {
    min-width: 820px;
  }

  .admin-usage-summary {
    grid-template-columns: 1fr 1fr;
    row-gap: 18px;
  }

  .admin-usage-metric:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .admin-usage-table {
    min-width: 760px;
  }

  .admin-service-user-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .admin-service-user-head {
    padding-bottom: 2px;
  }

  .admin-service-user-items {
    grid-template-columns: 1fr;
  }

  .admin-page-nav {
    width: 100%;
  }

  .admin-page-nav-link {
    min-width: 0;
    flex: 1 1 0;
    padding: 0 10px;
  }

  .admin-user-drawer {
    width: 100%;
    border-left: 0;
  }

  .admin-user-drawer-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .admin-user-drawer-rail {
    padding: max(8px, env(safe-area-inset-top)) 8px 8px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .admin-user-drawer-head {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 0 6px;
  }

  .admin-user-drawer-close {
    width: 40px;
    height: 40px;
  }

  .admin-user-drawer-head h2 {
    font-size: 17px;
  }

  .admin-user-drawer-head p {
    margin-top: 2px;
  }

  .admin-user-drawer-tablist {
    flex-direction: row;
    overflow-x: auto;
  }

  .admin-user-drawer-nav-item {
    width: auto;
    min-width: max-content;
    min-height: 44px;
    padding: 0 12px;
  }

  .admin-user-drawer-panels {
    padding: 18px;
  }

  .admin-user-drawer-pane-head h3 {
    font-size: 23px;
  }

  .admin-lifecycle-buttons .btn,
  .admin-redeploy-options label {
    flex: 1 1 auto;
    justify-content: center;
  }

  .admin-key-modal {
    width: calc(100vw - 20px);
  }
}

/* Account-scoped custom background. */
.app-shell {
  position: relative;
  isolation: isolate;
}

.user-background-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #000000;
  visibility: hidden;
  opacity: 0;
  transform: translateZ(0);
  contain: strict;
}

html[data-background-surface="home"] .user-background-layer-home,
html[data-background-surface="chat"] .user-background-layer-chat {
  visibility: visible;
  opacity: 1;
}

.user-background-layer :is(img, video) {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: block;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
}

.user-background-layer video {
  pointer-events: none;
}

.user-background-layer video::-webkit-media-controls,
.user-background-layer video::-webkit-media-controls-overlay-play-button,
.user-background-layer video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}

.user-background-layer-home :is(img, video) {
  filter: brightness(var(--home-background-brightness, 100%));
}

.user-background-layer-chat :is(img, video) {
  filter: brightness(var(--chat-background-brightness, 100%));
}

.user-background-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.42);
}

html[data-custom-background="true"] .shell-body {
  position: relative;
  z-index: 1;
}

html[data-custom-background="true"] .app-shell,
html[data-custom-background="true"] .main-area {
  background: transparent;
}

html[data-custom-background="true"] .sidebar {
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}

html[data-custom-background="true"] .main-area:not(.route-hermes):not(.route-chat) {
  background: rgba(0,0,0,0.20);
}

html[data-custom-background="true"] .main-area.route-hermes,
html[data-custom-background="true"] .main-area.route-chat,
html[data-custom-background="true"] .hermes-page,
html[data-custom-background="true"] .hermes-chat-shell,
html[data-custom-background="true"] .hermes-messages {
  background: transparent;
}

html[data-custom-background="true"] .hermes-session-panel {
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html[data-custom-background="true"] .hermes-scroll-guard {
  background: rgba(0,0,0,0.76);
}

html[data-theme="light"][data-custom-background="true"] .user-background-layer::after {
  background: rgba(255,255,255,0.30);
}

html[data-theme="light"][data-custom-background="true"] .sidebar {
  background: rgba(247,247,244,0.84);
}

html[data-custom-background="true"] .sidebar-header,
html[data-custom-background="true"] .sidebar-sticky-primary,
html[data-custom-background="true"] .sidebar-footer {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-custom-background="true"] .sidebar-chrome-mask {
  display: none;
}

html[data-theme="light"][data-custom-background="true"] .main-area:not(.route-hermes):not(.route-chat) {
  background: rgba(247,247,244,0.28);
}

html[data-theme="light"][data-custom-background="true"] .hermes-session-panel,
html[data-theme="light"][data-custom-background="true"] .hermes-scroll-guard {
  background: rgba(247,247,244,0.78);
}

html[data-home-background="true"] .main-area.route-dashboard .home-hermes-composer {
  background: rgba(29,29,29,0.76);
  backdrop-filter: blur(14px) saturate(1.06);
  -webkit-backdrop-filter: blur(14px) saturate(1.06);
}

html[data-theme="light"][data-home-background="true"] .main-area.route-dashboard .home-hermes-composer {
  background: rgba(255,255,255,0.76);
}

html[data-theme="light"][data-custom-accent="true"] .home-hermes-send,
html[data-theme="light"][data-custom-accent="true"] .hermes-send-btn {
  background: var(--user-accent-color);
  border-color: var(--user-accent-color);
  color: var(--user-accent-foreground);
}

@media (hover: none), (pointer: coarse) {
  .hermes-messages.has-transcript {
    padding-bottom: 0;
  }

  .hermes-messages.has-transcript::after {
    content: "";
    display: block;
    width: 100%;
    flex: 0 0 var(--hermes-scroll-bottom-gap);
    pointer-events: none;
  }
}
