:root[data-theme='light'] {
  --rg-bg: #F5F7FA;
  --rg-surface: #FFFFFF;
  --rg-surface-2: #EBEEF3;
  --rg-line: rgba(15, 20, 28, 0.085);
  --rg-line-soft: rgba(15, 20, 28, 0.055);
  --rg-text: #0F141C;
  --rg-muted: #5B6472;
  --rg-accent: #0F141C;
  --rg-accent-ink: #FFFFFF;
  --rg-accent-subtle: #E6EAF0;
  --rg-shadow: 0 1px 3px rgba(15, 20, 28, 0.04), 0 8px 22px -6px rgba(15, 20, 28, 0.06);
  --rg-bg-glass: rgba(255, 255, 255, 0.78);
}

#composer,
#view-chat #composer,
body.keyboard-open #composer {
  background: transparent;
  border: none;
  box-shadow: none;
}

#composer::before,
#composer::after {
  content: none;
  display: none;
  background: transparent;
}

#composer-card {
  background: var(--rg-bg-glass);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid var(--rg-line);
  box-shadow: var(--rg-shadow);
  transition: background 150ms cubic-bezier(0.16, 1, 0.3, 1), border-color 150ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme='light'] #composer-card {
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(15, 20, 28, 0.08);
  box-shadow: 0 8px 28px -6px rgba(15, 20, 28, 0.08), 0 2px 6px rgba(15, 20, 28, 0.03);
}

#chat-input {
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  resize: none;
}

#composer .card-row {
  align-items: center;
  gap: 6px;
}

.canvas-head .canvas-tabs {
  background: transparent;
  border-radius: 999px;
  padding: 3px;
}

.canvas-head .tab-btn {
  border-radius: 999px;
  transition: background 150ms cubic-bezier(0.16, 1, 0.3, 1), color 150ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

.canvas-head .tab-btn.active {
  background: var(--rg-surface);
  color: var(--rg-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sandbox-pill {
  background: var(--rg-accent-subtle);
  border-radius: 999px;
  padding: 4px 10px;
}

:root[data-theme='light'] .diff-line .ln,
:root[data-theme='light'] .tool-trace-card .diff-line .ln {
  color: #94a3b8;
}

:root[data-theme='light'] .diff-line.add,
:root[data-theme='light'] .md-diff-line.add {
  background: #ecfdf5;
}

:root[data-theme='light'] .diff-line.del,
:root[data-theme='light'] .md-diff-line.del {
  background: #fff1f2;
}

.sheet:not(#sheet-backdrop),
.studio-modal,
.popover {
  box-shadow: var(--rg-shadow);
}

.rg-row-sub,
#view-settings .cat-row-desc {
  display: none;
}

.hub-auto-dot {
  display: none;
}

.hub-summary-count {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

#view-artifacts,
#view-collection,
#view-project,
#view-settings,
#view-connect {
  background: var(--rg-bg);
  color: var(--rg-text);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

#view-artifacts .settings-header,
#view-collection .settings-header,
#view-project .settings-header,
#view-settings .settings-header,
#view-connect .settings-header {
  background: var(--rg-bg);
  color: var(--rg-text);
  border-bottom: 0;
  box-shadow: none;
}

#view-artifacts .settings-page,
#view-collection .settings-page,
#view-project .settings-page,
#view-settings .settings-page,
#view-connect .settings-page {
  width: 100%;
  max-width: 720px;
  min-width: 0;
  margin: 0 auto;
  padding: 0 16px calc(44px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  overflow-x: hidden;
}

#view-artifacts .settings-page > hr.divider,
#view-collection .settings-page > hr.divider,
#view-project .settings-page > hr.divider,
#view-settings .settings-page > hr.divider {
  display: none;
}

#view-artifacts .hub-summary-bar,
#view-project .hub-summary-bar,
#view-connect .hub-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 11px 14px;
  margin: 0 0 12px 0;
  border-radius: 16px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  box-shadow: var(--rg-shadow);
}

#view-collection .hub-summary-bar,
#view-settings #settings-summary-bar,
#view-settings #profile-divider,
#view-settings .storage-meter,
#view-collection #coll-more {
  display: none;
}

#view-artifacts #artifact-filters,
#view-collection #coll-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
  max-width: 100%;
  margin: 0 0 12px 0;
  padding: 0;
  box-sizing: border-box;
}

#view-artifacts #artifact-filters button,
#view-collection #coll-filters button,
#view-collection .coll-filter-chip {
  height: 34px;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--rg-line);
  background: var(--rg-surface);
  color: var(--rg-text);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
  width: 100%;
}

#view-artifacts #artifact-filters button.on,
#view-collection #coll-filters button.on,
#view-collection .coll-filter-chip.on {
  background: var(--rg-accent);
  color: var(--rg-accent-ink);
  border-color: var(--rg-accent);
}

#view-artifacts #artifact-page-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

#view-artifacts .coll-empty-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

#view-artifacts .artifact-empty-actions.hub-group,
#view-artifacts .rg-empty-note-card.hub-group,
#view-collection .hub-group,
#view-project .hub-group,
#view-connect .hub-group {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 8px 0;
  padding: 0;
  border-radius: 20px;
  border: 1px solid var(--rg-line);
  background: var(--rg-surface);
  box-shadow: var(--rg-shadow);
  overflow: hidden;
  box-sizing: border-box;
  list-style: none;
}

#view-artifacts .hub-card,
#view-collection .hub-card,
#view-project .hub-card,
#view-project .project-templates .hub-card,
#view-connect .hub-card {
  display: flex;
  flex: 1 1 100%;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 12px 14px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--rg-line-soft, var(--rg-line));
  border-radius: 0;
  background: var(--rg-surface);
  color: var(--rg-text);
  box-shadow: none;
  text-align: left;
  box-sizing: border-box;
  white-space: normal;
  cursor: pointer;
}

#view-artifacts .hub-card:last-child,
#view-collection .hub-card:last-child,
#view-project .hub-card:last-child,
#view-connect .hub-card:last-child {
  border-bottom: 0;
}

#view-artifacts .hub-mark,
#view-collection .hub-mark,
#view-project .hub-mark,
#view-settings .hub-mark {
  background: var(--rg-surface-2);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
}

#view-artifacts .hub-mark svg,
#view-collection .hub-mark svg,
#view-project .hub-mark svg,
#view-settings .hub-mark svg {
  stroke: currentColor;
  color: var(--rg-text);
}

#view-project .hub-card-body,
#view-artifacts .hub-card-body,
#view-collection .hub-card-body,
#view-connect .hub-card-body {
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
}

#view-project .hub-card-title,
#view-artifacts .hub-card-title,
#view-collection .hub-card-title,
#view-connect .hub-card-title {
  overflow: visible;
}

#view-project .hub-card-name,
#view-artifacts .hub-card-name,
#view-collection .hub-card-name,
#view-connect .hub-card-name {
  font-size: 14.5px;
  font-weight: 550;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.3;
  color: var(--rg-text);
}

#view-artifacts .hub-btn-connect.starter-chip,
#view-collection .hub-btn-connect,
#view-project .hub-btn-connect,
#view-connect .hub-btn-connect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rg-line);
  border-radius: 999px;
  background: var(--rg-surface-2);
  color: var(--rg-text);
  font-size: 12.5px;
  font-weight: 550;
  padding: 5px 12px;
  height: auto;
  width: auto;
  white-space: nowrap;
}

#view-collection .coll-tabs {
  display: flex;
  width: 100%;
  max-width: 100%;
  background: var(--rg-surface-2);
  border: 1px solid var(--rg-line);
  padding: 3px;
  border-radius: 12px;
  margin: 0 0 10px 0;
  box-sizing: border-box;
}

#view-collection .coll-tab {
  flex: 1 1 0%;
  height: 34px;
  border: 0;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rg-muted);
  background: transparent;
}

#view-collection .coll-tab.on {
  background: var(--rg-surface);
  color: var(--rg-text);
  box-shadow: var(--rg-shadow);
}

#view-collection .coll-search-box {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 0 10px 0;
  box-sizing: border-box;
}

#view-collection #coll-search {
  width: 100%;
  height: 40px;
  border-radius: 14px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  padding: 0 14px 0 36px;
  font-size: 13.5px;
  box-sizing: border-box;
}

#view-collection #coll-new-note {
  background: var(--rg-accent);
  color: var(--rg-accent-ink);
  border: 0;
  border-radius: 999px;
  height: 32px;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 600;
  width: auto;
}

#view-collection .coll-cat-count,
#view-collection .hub-count-pill,
.hub-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--rg-surface-2);
  border: 1px solid var(--rg-line);
  font-size: 12px;
  font-weight: 600;
  color: var(--rg-muted);
  white-space: nowrap;
}

#view-project .project-hero-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 100%;
}

#view-project #project-create-box.hub-group {
  padding: 12px 14px;
  margin: 0 0 8px 0;
}

#view-project .project-create-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
}

#view-project #project-name-sheet {
  flex: 1 1 0%;
  min-width: 0;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--rg-line);
  background: var(--rg-surface-2);
  color: var(--rg-text);
  padding: 0 14px;
  font-size: 13.5px;
  margin: 0;
}

#view-project #project-create-sheet {
  flex: 0 0 auto;
  width: auto;
  height: 38px;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: var(--rg-accent);
  color: var(--rg-accent-ink);
  font-size: 13px;
  font-weight: 650;
  margin: 0;
}

#view-settings #profile-head:not([hidden]) {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 13px 15px;
  margin: 0 0 8px 0;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  border-radius: 20px;
  box-shadow: var(--rg-shadow);
  box-sizing: border-box;
}

#view-settings .profile-head-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

#view-settings #profile-avatar {
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 50%;
  background: var(--rg-accent);
  color: var(--rg-accent-ink);
  font-size: 15px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
}

#view-settings .profile-meta {
  flex: 1 1 0%;
  min-width: 0;
  text-align: left;
}

#view-settings #profile-name {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--rg-text);
  margin: 0;
}

#view-settings #profile-mail {
  font-size: 12px;
  color: var(--rg-muted);
  margin: 2px 0 0 0;
}

#view-settings #profile-head .storage-meter {
  display: none;
}

#view-settings #settings-menu {
  padding: 0 0 28px 0;
}

#view-settings #settings-menu .set-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--rg-shadow);
}

#view-settings #settings-menu .cat-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 12px 14px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--rg-line-soft, var(--rg-line));
  border-radius: 0;
  background: var(--rg-surface);
  color: var(--rg-text);
  box-shadow: none;
}

#view-settings #settings-menu .cat-row:last-child {
  border-bottom: 0;
}

#view-settings .cat-row-title {
  font-size: 14.5px;
  font-weight: 550;
  white-space: normal;
  color: var(--rg-text);
}

#view-settings .cat-row-main .side-icon {
  color: var(--rg-text);
  width: 18px;
  height: 18px;
}

#view-artifacts .hub-kicker,
#view-collection .hub-kicker,
#view-project .hub-kicker,
#view-project .project-hero-card h2.hub-kicker,
#view-settings .hub-kicker,
#view-connect .hub-kicker {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--rg-muted);
  margin: 12px 0 6px 6px;
  line-height: 1.3;
}

#view-collection .coll-filter-chip {
  font-size: 11.5px;
  padding: 0 6px;
}

.hub-connected-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--rg-text);
  background: var(--rg-surface-2);
  border: 1px solid var(--rg-line);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.hub-connected-badge::before {
  content: none;
  display: none;
}

body:not(.studio-page) #topbar {
  background: var(--rg-bg-glass);
  border-bottom: 1px solid var(--rg-line-soft, var(--rg-line));
  gap: 10px;
  padding: 0 14px;
}

body:not(.studio-page) #topbar #btn-menu.menu-circle {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 11px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  box-shadow: var(--rg-shadow);
  color: var(--rg-text);
}

body:not(.studio-page) #topbar h1#header-model-name.header-model-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  margin: 0;
  border-radius: 11px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  box-shadow: var(--rg-shadow);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--rg-text);
  cursor: pointer;
}

body:not(.studio-page) #topbar h1#header-model-name.header-model-name::after {
  content: '';
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-color: var(--rg-muted);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 14px 14px;
  mask-size: 14px 14px;
}

body:not(.studio-page) #topbar .topbar-actions {
  gap: 6px;
  position: relative;
}

body:not(.studio-page) #topbar .topbar-actions .icon-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 11px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  box-shadow: var(--rg-shadow);
  color: var(--rg-text);
}

#chat-options-menu {
  position: absolute;
  right: 0;
  top: 44px;
  z-index: 65;
  display: flex;
  flex-direction: column;
  min-width: 204px;
  padding: 6px;
  border-radius: 16px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  box-shadow: var(--rg-shadow);
}

#chat-options-menu[hidden] {
  display: none;
}

#chat-options-menu button {
  text-align: left;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--rg-text);
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 12px;
  min-height: 38px;
  cursor: pointer;
}

#chat-options-menu button:hover,
#chat-options-menu button:active {
  background: var(--rg-surface-2);
}

#top-download-bar {
  padding: 10px 14px 0;
}

#top-download-bar .weight-card:not(:has(#weight-status[data-busy="1"])) {
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  padding: 0 6px 0 12px;
  gap: 6px;
}

#top-download-bar .weight-card:not(:has(#weight-status[data-busy="1"])) #weight-status {
  font-family: var(--rg-font-sans, -apple-system, BlinkMacSystemFont, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 600;
  color: var(--rg-muted);
  overflow: visible;
  text-overflow: clip;
}

#top-download-bar .weight-card:not(:has(#weight-status[data-busy="1"])) #btn-weight {
  background: var(--rg-surface-2);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
}

#model-sheet.sheet {
  background: var(--rg-bg);
  border: 1px solid var(--rg-line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  padding: 10px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--rg-shadow);
  gap: 12px;
}

#model-sheet.sheet::before {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--rg-line);
  margin: 0 auto 2px;
}

#model-sheet .sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 0 2px;
}

#model-sheet .sheet-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

#model-sheet .sheet-title {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--rg-text);
}

#model-sheet .sheet-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 11px 0 8px;
  border-radius: 999px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

#model-sheet #model-close {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  border-radius: 999px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  color: var(--rg-muted);
}

#model-sheet .model-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#model-sheet .model-main-group.hub-group:not([hidden]),
#model-sheet .model-speed-menu.hub-group:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--rg-shadow);
}

#model-sheet .sheet-back-btn[hidden],
#model-sheet .model-main-group.hub-group[hidden],
#model-sheet .model-speed-menu.hub-group[hidden],
#model-sheet [hidden] {
  display: none;
}

#model-sheet .hub-card,
#model-sheet .model-solo.hub-card,
#model-sheet .model-speed.hub-card,
#model-sheet .model-item.hub-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--rg-line-soft, var(--rg-line));
  border-radius: 0;
  background: var(--rg-surface);
  color: var(--rg-text);
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}

#model-sheet .hub-card:last-child,
#model-sheet .model-solo.hub-card:last-child,
#model-sheet .model-speed.hub-card:last-child,
#model-sheet .model-item.hub-card:last-child {
  border-bottom: 0;
}

#model-sheet .hub-card-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#model-sheet .hub-card-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--rg-text);
  letter-spacing: -0.01em;
}

#model-sheet .hub-card-sub {
  display: block;
  font-size: 12px;
  font-weight: 450;
  color: var(--rg-muted);
  line-height: 1.35;
  margin-top: 1px;
  white-space: normal;
}

#model-sheet .hub-card-side {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

#model-sheet .hub-btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--rg-surface-2);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  font-size: 12.5px;
  font-weight: 600;
}

#model-sheet .hub-check {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--rg-accent);
  color: var(--rg-accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#model-sheet .hub-check svg {
  stroke: var(--rg-accent-ink);
}

#sidebar {
  background: var(--rg-bg);
  border-right: 1px solid var(--rg-line);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#sidebar .side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 10px;
}

#sidebar .side-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--rg-text);
}

#sidebar .side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: transparent;
}

#sidebar .side-group-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#sidebar #btn-new-chat.side-link-primary,
#sidebar .side-group-card .side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 10px;
  margin: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  font-size: 14.5px;
  font-weight: 550;
  color: var(--rg-text);
  box-sizing: border-box;
  text-decoration: none;
  transition: background-color 0.14s ease;
}

#sidebar #btn-new-chat.side-link-primary:hover,
#sidebar .side-group-card .side-link:hover,
#sidebar #btn-new-chat.side-link-primary:active,
#sidebar .side-group-card .side-link:active,
#sidebar .side-group-card .side-link.on {
  background: var(--rg-ring);
}

#sidebar .side-icon-box,
#sidebar #btn-new-chat.side-link-primary .side-icon-box {
  width: 24px;
  height: 24px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--rg-text);
}

#sidebar .side-icon-box .side-icon,
#sidebar .side-icon {
  width: 18px;
  height: 18px;
  color: var(--rg-text);
  stroke: currentColor;
}

#sidebar .hist-head {
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rg-muted);
}

#sidebar .hist-search-input {
  height: 36px;
  border-radius: 10px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  padding: 0 12px;
  font-size: 13px;
}

#sidebar .sidebar-footer {
  margin-top: auto;
  padding: 8px 2px max(6px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--rg-line-soft, var(--rg-line));
}

#sidebar #sidebar-user-card {
  background: transparent;
  border: 0;
  border-radius: 12px;
  padding: 6px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: none;
}

#sidebar #sidebar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--rg-accent);
  color: var(--rg-accent-ink);
  font-size: 13.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

#sidebar .sidebar-user-meta,
#sidebar #sidebar-user-name,
#sidebar #sidebar-user-email {
  display: none;
}

#sidebar #btn-settings {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: transparent;
  border: 0;
  color: var(--rg-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
}

@media (max-width: 859px) {
  .settings-page,
  #connect-hub {
    scrollbar-width: none;
  }
  .settings-page::-webkit-scrollbar,
  #connect-hub::-webkit-scrollbar {
    display: none;
    width: 0;
  }
}

#view-collection .coll-tab-desc {
  display: none;
}

.msg.hit,
.msg.user.hit {
  outline: none;
}

.msg.user.hit .msg-user-bubble {
  box-shadow: 0 2px 10px -2px rgba(26, 75, 140, 0.14), 0 1px 2px rgba(15, 23, 42, 0.04);
}

mark.qhit {
  background: rgba(250, 182, 46, 0.45);
  color: inherit;
  border-radius: 4px;
  padding: 1px 4px;
  font-weight: 600;
}

.chat-search-bar {
  margin: 8px 14px 0;
  padding: 6px 10px;
  border-radius: 16px;
  border: 1px solid var(--rg-line);
  background: var(--rg-surface);
  box-shadow: var(--rg-shadow);
}

.chat-search-bar .icon-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  font-size: 14px;
  color: var(--rg-text);
}

#cowork:not([hidden]) {
  margin: 10px 14px 118px;
  border: 1px solid var(--rg-line);
  border-radius: 20px;
  background: var(--rg-surface);
  box-shadow: var(--rg-shadow);
  overflow: hidden;
}

#cowork .cowork-tabs,
#cowork .cowork-bar {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--rg-line-soft, var(--rg-line));
}

#cowork .cowork-tabs button,
#cowork .cowork-bar button {
  min-height: 32px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--rg-line);
  background: var(--rg-surface-2);
  color: var(--rg-text);
  font-size: 12.5px;
  font-weight: 550;
}

#cowork .cowork-tabs button.on {
  background: var(--rg-accent);
  color: var(--rg-accent-ink);
  border-color: var(--rg-accent);
}

#cowork-editor {
  padding: 14px 16px;
  color: var(--rg-text);
  font-size: 14px;
  line-height: 1.55;
}

#attach-sheet,
#studio-attach-sheet {
  background: var(--rg-bg);
  border-top: 1px solid var(--rg-line);
  border-radius: 24px 24px 0 0;
  padding: 16px 16px calc(22px + env(safe-area-inset-bottom, 0px));
  gap: 10px;
}

#attach-sheet .sheet-head,
#studio-attach-sheet .sheet-head {
  padding: 0 2px;
  margin-bottom: 2px;
}

#attach-sheet .sheet-title,
#studio-attach-sheet .sheet-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--rg-text);
}

#attach-sheet .sheet-head .hist-del,
#studio-attach-sheet .sheet-head .hist-del {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  border-radius: 9px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  display: inline-grid;
  place-items: center;
}

#attach-sheet .attach-grid,
#studio-attach-sheet .attach-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding-bottom: 0;
  border-bottom: none;
}

#studio-attach-sheet .attach-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#attach-sheet .attach-card,
#studio-attach-sheet .attach-card {
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  border-radius: 16px;
  padding: 11px 6px 10px;
  min-height: 76px;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--rg-text);
  box-shadow: var(--rg-shadow);
  white-space: nowrap;
}

#attach-sheet .attach-orb,
#studio-attach-sheet .attach-orb {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--rg-bg);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  display: grid;
  place-items: center;
}

#attach-sheet .attach-group-card[hidden],
#studio-attach-sheet .attach-group-card[hidden] {
  display: none;
}

#attach-sheet .attach-group-card:not([hidden]),
#studio-attach-sheet .attach-group-card:not([hidden]) {
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
}

#attach-sheet .attach-group-card .attach-plain[hidden],
#studio-attach-sheet .attach-group-card .attach-plain[hidden] {
  display: none;
}
#attach-sheet .attach-group-card .attach-plain:not([hidden]),
#studio-attach-sheet .attach-group-card .attach-plain:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--rg-line-soft, var(--rg-line));
  background: transparent;
  color: var(--rg-text);
  text-align: left;
}

#attach-sheet .attach-group-card .attach-plain:last-child,
#studio-attach-sheet .attach-group-card .attach-plain:last-child {
  border-bottom: none;
}

#attach-sheet .attach-row-mark,
#studio-attach-sheet .attach-row-mark {
  flex: 0 0 34px;
  width: 34px;
  max-width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 9px;
  background: var(--rg-bg);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

#attach-sheet .attach-plain-label,
#studio-attach-sheet .attach-plain-label {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 13.8px;
  font-weight: 620;
  line-height: 1.25;
  color: var(--rg-text);
}

#attach-sheet .attach-row-sub,
#studio-attach-sheet .attach-row-sub,
#attach-sheet .attach-plain-label small,
#studio-attach-sheet .attach-plain-label small {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--rg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#attach-sheet .attach-plain-pill,
#studio-attach-sheet .attach-plain-pill {
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--rg-bg);
  border: 1px solid var(--rg-line);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--rg-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#top-download-bar {
  padding: 8px 14px 0;
}

#top-download-bar .weight-card:has(#weight-status[data-busy="1"]) {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  height: auto;
  min-height: 58px;
  max-height: none;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  box-shadow: var(--rg-shadow);
}

#top-download-bar .weight-card:has(#weight-status[data-busy="1"]) .dl-ico {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--rg-bg);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  display: inline-grid;
  place-items: center;
}

#top-download-bar .weight-card:has(#weight-status[data-busy="1"]) #weight-status {
  order: 1;
  flex: 1 1 0%;
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 620;
  color: var(--rg-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#top-download-bar .weight-card:has(#weight-status[data-busy="1"]) .weight-actions {
  order: 2;
  flex: 0 0 auto;
  gap: 6px;
}

#top-download-bar .weight-card:has(#weight-status[data-busy="1"]) .weight-actions button {
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--rg-bg);
  border: 1px solid var(--rg-line);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--rg-text);
}

#top-download-bar .weight-card:has(#weight-status[data-busy="1"]) .weight-bar {
  order: 3;
  flex: 1 1 100%;
  width: 100%;
  height: 5px;
  min-width: 100%;
  border-radius: 999px;
  background: var(--rg-line);
  overflow: hidden;
}

@media (min-width: 860px) {
  #attach-sheet .attach-row-sub,
  #studio-attach-sheet .attach-row-sub {
    display: none;
  }
  #attach-sheet .attach-row-mark,
  #studio-attach-sheet .attach-row-mark {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    border-radius: 7px;
  }
  #attach-sheet .attach-group-card .attach-plain,
  #studio-attach-sheet .attach-group-card .attach-plain {
    padding: 6px 10px;
    gap: 9px;
  }
}

#attach-sheet .attach-row-sub,
#studio-attach-sheet .attach-row-sub {
  display: none;
}
#attach-sheet .attach-group-card .attach-plain[hidden],
#studio-attach-sheet .attach-group-card .attach-plain[hidden] {
  display: none;
}
#attach-sheet .attach-group-card .attach-plain:not([hidden]),
#studio-attach-sheet .attach-group-card .attach-plain:not([hidden]) {
  min-height: 50px;
  padding: 9px 14px;
  align-items: center;
}

#attach-sheet .attach-plain-label small,
#studio-attach-sheet .attach-plain-label small {
  display: none;
}


#view-settings #settings-content .set-section,
#view-settings #settings-content .set-section.set-section-danger {
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  border-radius: 18px;
  padding: 0;
  gap: 0;
  overflow: hidden;
  box-shadow: var(--rg-shadow);
}

#view-settings #settings-content .set-section .set-row,
#view-settings #settings-content .set-section.set-section-danger .set-row {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rg-line-soft);
  border-radius: 0;
  padding: 12px 16px;
  min-height: 54px;
  margin: 0;
}

#view-settings #settings-content .set-section .set-row:last-child,
#view-settings #settings-content .set-section.set-section-danger .set-row:last-child,
#view-settings #settings-content .set-section #set-section-ai > :last-child,
#view-settings #settings-content .set-section #set-section-preferensi > :last-child {
  border-bottom: none;
}

#view-settings #settings-content .set-row > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 560;
  color: var(--rg-text);
}

#view-settings #settings-content .set-row .hub-mark {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 9px;
  background: var(--rg-bg);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

#view-settings #settings-content .set-row .hub-mark svg,
#view-settings #settings-content .set-row .side-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  color: var(--rg-text);
}

#view-settings #settings-content .set-row.danger > span:first-child {
  color: var(--rg-text);
}

#view-settings #settings-content .set-hint {
  padding: 8px 16px 12px;
  margin: 0;
  border-bottom: 1px solid var(--rg-line-soft);
  font-size: 12px;
  color: var(--rg-muted);
}

#view-settings #model-main-card.model-solo {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--rg-text);
}

#view-settings #model-main-card.model-solo strong {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--rg-text);
}

#view-settings #model-main-card.model-solo .model-note {
  font-size: 12.5px;
  color: var(--rg-muted);
  margin: 0;
}

#view-settings #btn-unduh-offline.model-download {
  align-self: flex-start;
  background: var(--rg-text);
  color: var(--rg-bg);
  border: 1px solid var(--rg-text);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 620;
  box-shadow: none;
}

#memory-capsule {
  background: var(--rg-bg);
  color: var(--rg-text);
}

@media (min-width: 860px) {
  #memory-capsule > * {
    max-width: 780px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

#memory-capsule .memory-form-card {
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--rg-shadow);
}

#memory-capsule .memory-form-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rg-line-soft);
}

#memory-capsule .memory-form-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#memory-capsule .memory-form-title strong {
  font-size: 14px;
  font-weight: 650;
  color: var(--rg-text);
}

#memory-capsule .memory-form-title span {
  font-size: 12px;
  color: var(--rg-muted);
}

#memory-capsule .memory-submit-btn,
#memory-capsule .memory-tabs .coll-filter-chip.on,
#memory-capsule .memory-tabs button.on {
  background: var(--rg-text);
  color: var(--rg-bg);
  border-color: var(--rg-text);
}

#memory-capsule .memory-tabs .coll-filter-chip,
#memory-capsule .memory-tabs button {
  background: var(--rg-surface);
  color: var(--rg-muted);
  border: 1px solid var(--rg-line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

#memory-capsule .memory-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#memory-capsule .memory-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  border-radius: 16px;
}

#memory-capsule .memory-card-body {
  flex: 1 1 auto;
}

#memory-capsule .memory-badge {
  background: var(--rg-surface-2);
  color: var(--rg-text);
  border: 1px solid var(--rg-line);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 620;
}

#memory-capsule .memory-del-btn {
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--rg-bg);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  font-size: 11.5px;
  font-weight: 600;
}

#view-login .gate-card {
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  border-radius: 22px;
  padding: 22px;
  gap: 14px;
  max-width: 400px;
}

.login-mode-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--rg-bg);
  border: 1px solid var(--rg-line);
  border-radius: 999px;
}

.login-mode-btn {
  flex: 1;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--rg-muted);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.login-mode-btn.active {
  background: var(--rg-text);
  color: var(--rg-bg);
}

.auth-pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.auth-pw-wrap .auth-input {
  padding-right: 44px;
}

.auth-pw-toggle {
  position: absolute;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--rg-muted);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.auth-pw-toggle:hover {
  color: var(--rg-text);
  background: var(--rg-bg);
}

.login-pw-hint {
  font-size: 11.5px;
  color: var(--rg-muted);
  padding: 0 4px;
}

.login-error-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--rg-surface-2);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  font-size: 12.5px;
  line-height: 1.4;
}

.login-error-Box[hidden],
.login-error-box[hidden] {
  display: none;
}

.login-error-ico {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--rg-text);
}

#view-login .auth-submit,
#view-login .auth-submit-plain {
  background: var(--rg-text);
  color: var(--rg-bg);
  border: 1px solid var(--rg-text);
  border-radius: 999px;
  font-weight: 650;
  height: 44px;
  padding: 0 18px;
}

.gate-legal-note {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--rg-muted);
  text-align: center;
  padding-top: 4px;
  border-top: 1px solid var(--rg-line-soft);
}

.gate-legal-link {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--rg-text);
  font-size: inherit;
  font-weight: 620;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.legal-doc-modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  background: rgba(15, 20, 28, 0.42);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.legal-doc-modal[hidden] {
  display: none;
}

.legal-doc-sheet {
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--rg-bg);
  border: 1px solid var(--rg-line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--rg-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--rg-line-soft);
}

.legal-doc-head h2 {
  font-size: 17px;
  font-weight: 650;
  margin: 0;
  color: var(--rg-text);
}

.legal-doc-tabs {
  display: flex;
  gap: 6px;
}

.legal-doc-tabs .coll-filter-chip {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--rg-line);
  background: var(--rg-surface);
  color: var(--rg-muted);
  font-size: 12px;
  font-weight: 600;
}

.legal-doc-tabs .coll-filter-chip.on {
  background: var(--rg-text);
  color: var(--rg-bg);
  border-color: var(--rg-text);
}

.legal-card-group {
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  border-radius: 18px;
  overflow: hidden;
}

.legal-card-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rg-line-soft);
}

.legal-card-row:last-child {
  border-bottom: none;
}

.legal-card-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.legal-card-copy strong {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--rg-text);
}

.legal-card-copy p {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--rg-muted);
  margin: 0;
}

.legal-doc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
}

.legal-ext-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--rg-muted);
  text-decoration: underline;
}

.privacy-standalone-body {
  background: var(--rg-bg);
  color: var(--rg-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.privacy-standalone-page {
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 18px 48px;
}

.privacy-standalone-foot {
  margin-top: 20px;
  display: flex;
  justify-content: flex-start;
}

.privacy-standalone-foot .hub-btn-connect {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
}

.voice-live-hud {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 14px;
  background: var(--rg-surface-2);
  border: 1px solid var(--rg-line);
}

.voice-live-hud[hidden] {
  display: none;
}

.voice-hud-wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
}

.voice-hud-wave .voice-bar {
  width: 3px;
  height: 8px;
  border-radius: 999px;
  background: var(--rg-text);
  transition: height 0.12s ease;
}

.voice-hud-status {
  flex: 1 1 auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--rg-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voice-duplex-btn {
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--rg-line);
  background: var(--rg-surface);
  color: var(--rg-muted);
  font-size: 11px;
  font-weight: 620;
}

.voice-duplex-btn.on {
  background: var(--rg-text);
  color: var(--rg-bg);
  border-color: var(--rg-text);
}

.voice-opt-row {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rg-line-soft);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.voice-opt-row:last-child {
  border-bottom: none;
}

.voice-opt-row > span:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.voice-opt-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.voice-opt-copy strong {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--rg-text);
}

.voice-opt-copy small {
  font-size: 11.5px;
  color: var(--rg-muted);
}

#memory-capsule .memory-clear-btn {
  background: var(--rg-surface);
  color: var(--rg-text);
  border: 1px solid var(--rg-line);
  border-radius: 999px;
  height: 34px;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 600;
}
.privacy-standalone-page .settings-header a.back-btn {
  color: var(--rg-text);
  text-decoration: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  display: inline-grid;
  place-items: center;
}
.privacy-standalone-page .legal-card-row .hub-mark {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 9px;
  background: var(--rg-bg);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}


#legal-doc-modal.legal-full-page,
#thought-process-page.legal-full-page {
  position: fixed;
  inset: 0;
  z-index: 260;
  background: var(--rg-bg);
  backdrop-filter: none;
  color: var(--rg-text);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0 14px calc(36px + env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#legal-doc-modal.legal-full-page[hidden],
#thought-process-page.legal-full-page[hidden] {
  display: none;
}

.legal-full-inner {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-full-inner .settings-header {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--rg-bg);
  height: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--rg-line-soft);
}

.legal-full-inner .settings-header .back-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 11px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  display: inline-grid;
  place-items: center;
}

.legal-full-inner .hub-summary-bar {
  margin: 2px 0 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
}

.legal-full-inner .hub-summary-count {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 600;
}

.legal-full-inner .legal-doc-tabs {
  display: flex;
  gap: 8px;
  margin: 2px 0;
}

.legal-full-inner .legal-doc-tabs .coll-filter-chip {
  height: 34px;
  padding: 0 16px;
  font-size: 12.5px;
  font-weight: 620;
}

.legal-full-inner .legal-card-group {
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--rg-shadow);
}

.legal-full-inner .legal-card-row {
  padding: 16px;
  gap: 14px;
  align-items: flex-start;
}

.legal-full-inner .legal-card-row .hub-mark {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 9px;
  background: var(--rg-bg);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

.legal-full-inner .legal-card-copy strong {
  font-size: 14px;
  line-height: 1.35;
}

.legal-full-inner .legal-card-copy p {
  font-size: 13px;
  line-height: 1.55;
}

.thought-live-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0 8px 1px;
  color: var(--rg-muted);
  font-size: 12.8px;
  font-weight: 500;
  cursor: pointer;
  max-width: 100%;
  animation: thought-step-in 0.2s ease-out;
}

.thought-live-ticker[hidden] {
  display: none;
}

.thought-ticker-ico {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--rg-text);
  animation: thought-mono-pulse 1.3s ease-in-out infinite;
}

.thought-ticker-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--rg-muted);
}

.thought-page-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.thought-page-pill {
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 620;
  background: var(--rg-surface-2);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  display: inline-flex;
  align-items: center;
}

.thought-page-row.is-live .thought-page-pill {
  background: var(--rg-text);
  color: var(--rg-bg);
  border-color: var(--rg-text);
}

.md-fence {
  margin: 12px 0;
  border-radius: 16px;
  border: 1px solid var(--rg-line);
  background: var(--rg-surface);
  overflow: hidden;
  box-shadow: var(--rg-shadow);
}

.md-fence-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--rg-surface-2);
  border-bottom: 1px solid var(--rg-line-soft);
}

.md-fence-bar .md-lang {
  margin-right: auto;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--rg-text);
  letter-spacing: 0.02em;
}

.md-fence-bar button[data-act="code"],
.md-fence-bar button[data-act="diff"] {
  display: none;
}

.md-fence-bar button {
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--rg-line);
  background: var(--rg-surface);
  color: var(--rg-text);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.md-pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  font-family: var(--rg-font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
  font-size: 12.5px;
  line-height: 1.55;
  background: var(--rg-surface);
  color: var(--rg-text);
}

.thought-accordion summary,
.thought-accordion[open] summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  width: 100%;
}
.thought-summary-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}


#view-login .gate {
  background: var(--rg-bg);
  padding: max(24px, env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
}

#view-login .gate-shell {
  width: 100%;
  max-width: 380px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
}

#view-login .gate-brand {
  padding: 8px 0 6px;
  gap: 10px;
  text-align: center;
}

#view-login .gate-emblem {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--rg-text);
  color: var(--rg-bg);
  display: inline-grid;
  place-items: center;
  margin-bottom: 4px;
  box-shadow: var(--rg-shadow);
}

#view-login .gate-title {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--rg-text);
}

#view-login .gate-subtitle {
  max-width: 290px;
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.5;
  color: var(--rg-muted);
}

#view-login .gate-card.gate-clean-stack {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  gap: 12px;
  max-width: 100%;
}

#view-login .google-signin-row {
  width: 100%;
  gap: 14px;
}

#view-login .google-signin-btn-wrap {
  width: 100%;
}

#view-login .google-btn-placeholder.gate-pill-btn {
  width: 100%;
  max-width: 100%;
  height: 50px;
  border-radius: 999px;
  background: var(--rg-surface);
  color: var(--rg-text);
  border: 1px solid var(--rg-line);
  font-size: 14.5px;
  font-weight: 620;
  font-family: var(--rg-font-sans);
  box-shadow: var(--rg-shadow);
}

#view-login .auth-or {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--rg-muted);
  margin: 2px 0;
}

#view-login .login-form {
  gap: 10px;
}

#view-login .auth-input {
  height: 48px;
  border-radius: 999px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  padding: 0 18px;
  font-size: 14.5px;
  color: var(--rg-text);
}

#view-login .auth-pw-wrap .auth-input {
  padding-right: 46px;
}

#view-login .auth-pw-toggle {
  right: 12px;
  border-radius: 999px;
}

#view-login .auth-submit.gate-primary-pill {
  height: 50px;
  border-radius: 999px;
  background: var(--rg-text);
  color: var(--rg-bg);
  border: 1px solid var(--rg-text);
  font-size: 14.5px;
  font-weight: 650;
  margin-top: 2px;
}

#view-login .login-tabs.gate-secondary-methods {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#view-login .login-tabs.gate-secondary-methods[hidden] {
  display: none;
}

#view-login .login-tabs.gate-secondary-methods .login-tab.active {
  display: none;
}

#view-login .login-tabs.gate-secondary-methods .login-tab.gate-alt-pill {
  width: 100%;
  height: 48px;
  border-radius: 999px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
}

#view-login .login-mode-switch.gate-inline-mode {
  background: transparent;
  border: none;
  padding: 4px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

#view-login .gate-mode-prompt {
  font-size: 13px;
  color: var(--rg-muted);
}

#view-login .login-mode-switch.gate-inline-mode .login-mode-btn.active {
  display: none;
}

#view-login .login-mode-switch.gate-inline-mode .login-mode-btn {
  flex: 0 0 auto;
  height: auto;
  padding: 2px 4px;
  background: transparent;
  color: var(--rg-text);
  font-size: 13px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#view-login .gate-legal-note {
  border-top: none;
  padding-top: 8px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--rg-muted);
}

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

.thought-spin-svg {
  animation: rg-spin-ring 0.9s linear infinite;
}

.thought-live-ticker.thought-inline-stream {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 4px 0 6px 1px;
  width: 100%;
}

.thought-Live-ticker[hidden],
.thought-live-ticker.thought-inline-stream[hidden] {
  display: none;
}

.thought-inline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  font-size: 13px;
  line-height: 1.4;
  color: var(--rg-muted);
  animation: thought-step-in 0.2s ease-out;
}

.thought-inline-row.is-done {
  opacity: 0.82;
}

.thought-inline-row.is-live {
  color: var(--rg-text);
  font-weight: 560;
}

.thought-inline-row.is-done .thought-ticker-ico {
  animation: none;
  color: var(--rg-muted);
}

.thought-inline-row.is-live .thought-ticker-ico {
  animation: none;
  color: var(--rg-text);
}

.thought-inline-row.is-live .thought-ticker-text {
  color: var(--rg-text);
}

#thought-process-page.thought-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 260;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 0;
  overflow: hidden;
}

#thought-process-page.thought-sheet-overlay[hidden] {
  display: none;
}

.thought-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 28, 0.36);
  backdrop-filter: blur(2px);
}

.thought-sheet-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: 64vh;
  background: var(--rg-bg);
  border-top: 1px solid var(--rg-line);
  border-radius: 24px 24px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 760px) {
  #thought-process-page.thought-sheet-overlay {
    justify-content: center;
    padding: 24px;
  }
  .thought-sheet-panel {
    border: 1px solid var(--rg-line);
    border-radius: 22px;
    max-height: 70vh;
    padding: 14px 22px 22px;
  }
}

.thought-sheet-grabber {
  display: flex;
  justify-content: center;
  padding: 2px 0 4px;
}

.thought-sheet-pill {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: var(--rg-line);
}

.thought-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 6px;
}

.thought-sheet-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.thought-sheet-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 680;
  color: var(--rg-text);
  letter-spacing: -0.01em;
}

.thought-sheet-badge {
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  color: var(--rg-muted);
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.thought-sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.thought-timeline {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.thought-rail-item {
  display: flex;
  align-items: stretch;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.thought-rail-left {
  width: 20px;
  flex: 0 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.thought-rail-ico {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rg-text);
  flex-shrink: 0;
  margin-top: 1px;
}

.thought-rail-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rg-text);
  display: inline-block;
}

.thought-rail-line {
  flex: 1 1 auto;
  width: 1.5px;
  min-height: 16px;
  margin: 4px 0;
  background: var(--rg-line);
}

.thought-rail-body {
  flex: 1 1 auto;
  min-width: 0;
  padding-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.thought-rail-item:last-child .thought-rail-body {
  padding-bottom: 4px;
}

.thought-rail-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.thought-rail-title {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 560;
  color: var(--rg-text);
}

.thought-rail-item.is-live .thought-rail-title {
  font-weight: 650;
}

.thought-rail-chip {
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  color: var(--rg-muted);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.thought-rail-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--rg-muted);
}


#view-login .gate-sovereign-seal {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid var(--rg-text);
  padding: 3px;
  display: inline-grid;
  place-items: center;
  margin: 0 auto 4px;
  background: var(--rg-surface);
  box-shadow: var(--rg-shadow);
}



#view-login .gate-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--rg-surface-2);
  border: 1px solid var(--rg-line);
  color: var(--rg-muted);
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 2px;
}

#view-login .gate-card.gate-sovereign-card {
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--rg-shadow);
  gap: 12px;
}

#view-login .gate-field-group {
  background: var(--rg-surface-2);
  border: 1px solid var(--rg-line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#view-login .gate-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--rg-line-soft);
  position: relative;
}

#view-login .gate-field-row:last-child {
  border-bottom: none;
}

#view-login .gate-field-row[hidden] {
  display: none;
}

#view-login .gate-field-ico {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 9px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  color: var(--rg-text);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

#view-login .auth-input.gate-grouped-input {
  height: 38px;
  border: none;
  border-radius: 8px;
  background: transparent;
  padding: 0 6px;
  box-shadow: none;
  font-size: 14px;
}

#view-login .auth-pw-wrap .auth-input.gate-grouped-input {
  padding-right: 38px;
}

.thought-stage-pill {
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--rg-surface-2);
  border: 1px solid var(--rg-line);
  color: var(--rg-muted);
  font-size: 11px;
  font-weight: 620;
  display: inline-flex;
  align-items: center;
}

.thought-sheet-progress {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--rg-surface-2);
  overflow: hidden;
}

.thought-sheet-progress-bar {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--rg-text);
  transition: width 0.25s ease;
}

.thought-timeline.thought-sovereign-group {
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  border-radius: 18px;
  padding: 14px 16px;
}

.thought-step-ico-box, .thought-step-num-box {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 9px;
  background: var(--rg-bg);
  color: var(--rg-text);
  border: 1px solid var(--rg-line);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.thought-rail-item.is-live .thought-step-ico-box {
  background: var(--rg-text);
  color: var(--rg-bg);
  border-color: var(--rg-text);
}
.thought-step-num-box-legacy {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  border-radius: 9px;
  background: var(--rg-text);
  color: var(--rg-bg);
  border: 1px solid var(--rg-text);
  font-size: 11.5px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

.thought-rail-item.is-live .thought-step-ico-box, .thought-step-num-box {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 9px;
  background: var(--rg-bg);
  color: var(--rg-text);
  border: 1px solid var(--rg-line);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.thought-rail-item.is-live .thought-step-ico-box {
  background: var(--rg-text);
  color: var(--rg-bg);
  border-color: var(--rg-text);
}
.thought-step-num-box-legacy {
  background: var(--rg-surface-2);
  color: var(--rg-text);
  border: 1px solid var(--rg-line);
}

.thought-sovereign-group .thought-rail-left {
  width: 30px;
  flex: 0 0 30px;
}

#view-login .login-tabs.gate-secondary-methods .login-tab.active,
#view-login .login-tabs.gate-secondary-methods .login-tab[hidden] {
  display: none;
}



#empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-align: center;
  padding: 0 28px 164px;
  box-sizing: border-box;
}

#empty-state[hidden] {
  display: none;
}

#empty-state .empty-brand,
.studio-welcome-title {
  font-family: var(--rg-font-display);
  font-size: clamp(22px, 5.2vw, 32px);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.24;
  color: var(--rg-text);
  max-width: min(82vw, 520px);
  margin: 0 auto;
  text-wrap: balance;
}

#empty-state .empty-greeting-sub,
#empty-greeting-sub,
#studio-greeting-sub,
.empty-greeting-sub,
.thought-stage-pill {
  display: none;
}

@media (max-width: 1023px) {
  #view-chat #empty-state {
    padding: 0 28px 156px;
  }
  body.studio-page .studio-app:not(.is-active) #empty-state {
    padding: 36px 28px 72px;
  }
  #empty-state .empty-brand,
  .studio-welcome-title {
    font-size: clamp(21px, 5.3vw, 25px);
    max-width: 80vw;
  }
}

@media (min-width: 1024px) {
  #empty-state {
    padding: 0 24px;
    margin-bottom: 18px;
  }
  #empty-state .empty-brand,
  .studio-app:not(.is-active) .studio-welcome-title {
    font-size: clamp(28px, 2.6vw, 33px);
    max-width: 560px;
    margin: 0 auto;
  }
  #view-chat #composer,
  #view-chat:has(#messages:empty) #composer,
  body.studio-page #composer,
  body.studio-page .studio-app:not(.is-active) #composer {
    width: min(660px, calc(100% - 64px));
    max-width: 660px;
    margin-left: auto;
    margin-right: auto;
  }
  #view-chat #messages,
  body.studio-page .studio-app.is-active #messages {
    width: min(660px, calc(100% - 64px));
    max-width: 660px;
    margin-left: auto;
    margin-right: auto;
  }
  #view-chat .top-download-bar,
  #view-chat:has(#messages:empty) .top-download-bar,
  #view-chat:has(#messages:empty) .chat-inspiration-grid,
  body.studio-page .studio-app:not(.is-active) .inspiration-cards {
    width: min(660px, calc(100% - 64px));
    max-width: 660px;
    margin-left: auto;
    margin-right: auto;
  }
}

#thought-process-page.thought-sheet-overlay .thought-sheet-panel {
  max-height: 78vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--rg-bg);
}

#thought-process-page .thought-sheet-grabber,
#thought-process-page .thought-sheet-head,
#thought-process-page .thought-sheet-progress {
  flex-shrink: 0;
}

#thought-process-page .thought-sheet-grabber,
#thought-process-page .thought-sheet-head {
  cursor: grab;
  user-select: none;
}

#thought-process-page .thought-timeline.thought-sovereign-group {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(78vh - 108px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: var(--rg-line-accent) transparent;
}

#thought-process-page .thought-rail-body {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding-bottom: 16px;
}

#thought-process-page .thought-rail-title {
  line-height: 1.45;
  display: block;
}

#thought-process-page .thought-rail-sub {
  line-height: 1.52;
  margin-top: 3px;
  display: block;
}

body #app .settings-header .back-btn,
body #app .settings-header #btn-back,
body #app .settings-header #project-back,
body #app .settings-header #connect-back,
body #app .settings-header #artifact-page-back,
body #app .settings-header #coll-back,
body #legal-doc-modal .settings-header .back-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 11px;
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  box-shadow: var(--rg-shadow);
  color: var(--rg-text);
  cursor: pointer;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.14s ease;
}

body #app .settings-header .back-btn:hover,
body #legal-doc-modal .settings-header .back-btn:hover {
  background: var(--rg-surface-2);
  border-color: var(--rg-line-accent);
  transform: translateY(-1px);
}

body #app .settings-header .back-btn:active,
body #legal-doc-modal .settings-header .back-btn:active {
  transform: scale(0.96);
}

button,
a.side-link,
.side-link,
.icon-btn,
.menu-circle,
#header-model-name,
#btn-plus,
#btn-model,
#btn-send,
#btn-mic,
#btn-new-chat,
#btn-new-chat-top,
#btn-chat-more,
.set-row.clickable,
.set-row.clickable *,
.cat-row,
.cat-row *,
.hub-card,
.hub-btn-connect,
.attach-card,
.attach-card *,
.attach-plain,
.attach-plain *,
.coll-tab,
.coll-cat-row,
.proj-tpl-row,
.art-create-row,
.hist-head,
.hist-item,
.thought-summary,
.chat-insp-card,
.studio-nav-item,
.tab-btn {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.set-row.clickable,
.cat-row,
.side-link,
.attach-card,
.attach-plain,
.hub-card,
.coll-cat-row,
.proj-tpl-row,
.art-create-row,
#btn-plus,
#btn-model,
#header-model-name,
#topbar .icon-btn,
#topbar .menu-circle {
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.14s ease, box-shadow 0.16s ease;
}

@media (hover: hover) and (pointer: fine) {
  #view-settings .set-row.clickable:hover,
  #view-settings #settings-menu .cat-row:hover,
  #view-connect .hub-card:hover,
  #view-collection .coll-cat-row:hover,
  #view-project .proj-tpl-row:hover,
  #view-artifacts .art-create-row:hover,
  #attach-sheet .attach-group-card .attach-plain:hover,
  #studio-attach-sheet .attach-group-card .attach-plain:hover {
    background: var(--rg-surface-2);
  }

  #attach-sheet .attach-card:hover,
  #studio-attach-sheet .attach-card:hover,
  #composer #btn-plus:hover,
  #composer #btn-model:hover,
  #topbar #header-model-name:hover,
  #topbar .icon-btn:hover,
  #topbar .menu-circle:hover,
  .studio-topbar .icon-btn:hover {
    background: var(--rg-surface-2);
    border-color: var(--rg-line-accent);
    transform: translateY(-1px);
  }

  #sidebar .side-link:hover,
  .studio-sidebar .studio-nav-item:hover {
    background: var(--rg-surface-2);
  }
}

@media (min-width: 860px) {
  #sidebar .zone-top {
    padding-top: 16px;
  }

  #sidebar .side-top {
    padding: 6px 14px 12px;
    margin-bottom: 4px;
  }

  #view-artifacts .settings-page,
  #view-collection .settings-page,
  #view-project .settings-page,
  #view-settings .settings-page,
  #view-connect .settings-page {
    max-width: 760px;
    padding: 32px 28px 64px;
  }

  #view-artifacts .settings-header,
  #view-collection .settings-header,
  #view-project .settings-header,
  #view-settings .settings-header,
  #view-connect .settings-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 0 16px 0;
    margin: 0 0 6px 0;
  }

  #attach-sheet,
  #studio-attach-sheet {
    width: 368px;
    max-width: calc(100vw - 32px);
    padding: 14px;
    gap: 10px;
    background: var(--rg-bg);
    border: 1px solid var(--rg-line);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(15, 20, 28, 0.16), 0 4px 14px rgba(15, 20, 28, 0.06);
  }

  #attach-sheet .attach-plain-label,
  #studio-attach-sheet .attach-plain-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13.5px;
  }
}

@media (min-width: 1024px) {
  body.studio-page .studio-app:not(.is-active) #empty-state {
    flex: 0 0 auto;
    order: 1;
    margin: 0 0 18px;
  }
  body.studio-page .studio-app:not(.is-active) #composer {
    order: 2;
  }
  body.studio-page .studio-app:not(.is-active) .inspiration-cards {
    order: 3;
    display: flex;
    margin-top: 16px;
  }
}


html.rg-guest-boot #topbar,
html.rg-guest-boot #view-chat,
html.rg-guest-boot #sidebar {
  display: none;
}

.empty-hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  margin: 0 auto 14px;
  color: var(--rg-text);
}

#view-login {
  height: 100%;
  min-height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#view-login::-webkit-scrollbar {
  display: none;
}

#view-login .gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  padding: 0 18px;
  box-sizing: border-box;
}

#view-login .gate-shell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100dvh;
  flex: 0 0 auto;
  gap: 9px;
  margin: 0 auto;
  width: 100%;
  max-width: 380px;
  padding: max(16px, env(safe-area-inset-top)) 0 max(16px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}

#view-login .gate-brand {
  padding: 0;
  gap: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#view-login .gate-crest-stage,
.gate-crest-stage {
  position: relative;
  width: 236px;
  height: 124px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#view-login .gate-kinetic-hands,
.gate-kinetic-hands {
  width: 236px;
  height: 124px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rg-text);
}

#view-login .gate-brand .gate-sovereign-seal,
#view-login .gate-sovereign-seal,
.gate-sovereign-seal {
  position: absolute;
  left: 50%;
  top: 29.5%;
  transform: translate3d(-50%, -50%, 0);
  width: 70px;
  height: 70px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rg-text);
  animation: rgCrestLogoAwake 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes rgCrestLogoAwake {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -44%, 0) scale(0.88);
  }
  100% {
    opacity: 1;
    transform: translate3d(-50%, -50%, 0) scale(1);
  }
}

#view-login .gate-title {
  font-size: 31px;
  line-height: 1.08;
  margin: -4px 0 2px;
  letter-spacing: -0.02em;
}

#view-login .gate-card.gate-sovereign-card {
  padding: 14px 16px;
  gap: 8px;
  border-radius: 20px;
}

#view-login .google-signin-row {
  gap: 7px;
}

#view-login .google-btn-placeholder.gate-pill-btn,
#view-login .auth-submit.gate-primary-pill,
#view-login .login-tabs.gate-secondary-methods .login-tab.gate-alt-pill {
  height: 42px;
  font-size: 13.8px;
}

#view-login .auth-or {
  margin: 0;
  font-size: 10.5px;
}

#view-login .login-form {
  gap: 7px;
}

#view-login .gate-field-row {
  padding: 4px 8px;
}

#view-login .auth-input.gate-grouped-input {
  height: 34px;
  font-size: 13.8px;
}

#view-login .login-mode-switch.gate-inline-mode {
  padding: 2px 0 0;
}

#view-login .gate-legal-note {
  padding-top: 2px;
  font-size: 11px;
  line-height: 1.38;
}

.rawoke-composer-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px 10px;
  margin: -2px -2px 6px;
  background: var(--rg-bg);
  border: 1px solid var(--rg-line);
  border-radius: 16px;
}

.rawoke-composer-bar[hidden] {
  display: none;
}

.rawoke-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rawoke-bar-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--rg-text);
}

.rawoke-bar-brand strong {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.rawoke-bar-sub {
  font-size: 11.5px;
  color: var(--rg-muted);
  font-weight: 500;
}

.rawoke-bar-close {
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  border-radius: 8px;
  border: 1px solid var(--rg-line);
  background: var(--rg-surface);
  color: var(--rg-text);
  display: inline-grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.rawoke-bar-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 1px;
}

.rawoke-bar-pills::-webkit-scrollbar {
  display: none;
}

@media (max-width: 720px) {
  #composer-card:has(#rawoke-composer-bar:not([hidden])) #chat-input {
    min-height: 50px;
  }
}

.rawoke-mode-pill {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--rg-line);
  background: var(--rg-surface);
  color: var(--rg-text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.rawoke-mode-pill.on {
  background: var(--rg-text);
  color: var(--rg-bg);
  border-color: var(--rg-text);
}

#cowork.rawoke {
  background: var(--rg-surface);
  border: 1px solid var(--rg-line);
  border-radius: 20px;
  padding: 12px 14px;
  margin: 8px 12px 14px;
  box-shadow: var(--rg-shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#cowork.rawoke[hidden] {
  display: none;
}

#cowork.rawoke .cowork-tabs,
#cowork.rawoke .cowork-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: visible;
  flex-wrap: wrap;
  scrollbar-width: none;
  padding-bottom: 4px;
}

#cowork.rawoke .cowork-tabs::-webkit-scrollbar,
#cowork.rawoke .cowork-bar::-webkit-scrollbar {
  display: none;
}

#cowork.rawoke .cowork-tabs button,
#cowork.rawoke .cowork-bar button {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--rg-line);
  background: var(--rg-bg);
  color: var(--rg-text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

#cowork.rawoke .cowork-tabs button.on {
  background: var(--rg-text);
  color: var(--rg-bg);
  border-color: var(--rg-text);
}

#cowork.rawoke .rawoke-spec-pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

#cowork.rawoke .rawoke-editor {
  min-height: 220px;
  max-height: 48dvh;
  overflow-y: auto;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--rg-line);
  background: var(--rg-bg);
  color: var(--rg-text);
  font-size: 14.5px;
  line-height: 1.65;
}

.rg-thought-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--rg-text);
  flex-shrink: 0;
  overflow: visible;
}

#view-login input:-webkit-autofill,
#view-login input:-webkit-autofill:hover,
#view-login input:-webkit-autofill:focus,
#view-login input:-webkit-autofill:active,
.gate-field input:-webkit-autofill,
.gate-field input:-webkit-autofill:hover,
.gate-field input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--rg-surface-2) inset;
  box-shadow: 0 0 0 1000px var(--rg-surface-2) inset;
  -webkit-text-fill-color: var(--rg-text);
  caret-color: var(--rg-text);
  transition: background-color 9999s ease-out 0s;
}

body.auth-gate #toast {
  top: max(18px, env(safe-area-inset-top));
  bottom: auto;
  z-index: 9999;
}

.artifact-card-actions .artifact-card-btn-rawoke {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

#btn-quick-slide.rawoke-composer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: auto;
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--rg-line);
  background: var(--rg-surface-2);
  color: var(--rg-text);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.16s ease;
}

#btn-quick-slide.rawoke-composer-toggle.on {
  background: var(--rg-text);
  color: var(--rg-bg);
  border-color: var(--rg-text);
}

#btn-quick-slide .rawoke-toggle-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.rawoke-bar-right-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rawoke-bar-canvas-btn {
  appearance: none;
  border: 1px solid var(--rg-line);
  background: var(--rg-surface);
  color: var(--rg-text);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.rawoke-bar-guide {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--rg-muted);
  margin: 6px 2px 4px;
}

.rawoke-quick-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: none;
}

.rawoke-quick-chips::-webkit-scrollbar {
  display: none;
}

.rawoke-quick-chip {
  appearance: none;
  flex: 0 0 auto;
  border: 1px solid var(--rg-line);
  background: var(--rg-surface);
  color: var(--rg-text);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.12s ease;
}

.rawoke-quick-chip:hover,
.rawoke-quick-chip:active {
  background: var(--rg-surface-2);
}

@media (max-width: 720px) {
  .rawoke-bar-brand {
    flex-wrap: wrap;
    min-width: 0;
  }
  .rawoke-bar-sub {
    flex-basis: 100%;
  }
  body:has(#rawoke-composer-bar:not([hidden])) #toast {
    bottom: auto;
    top: 128px;
  }
}

body.studio-page .studio-app.is-active #messages {
  display: flex;
}

#view-chat #messages:empty,
body.studio-page .studio-app:not(.is-active) #messages {
  display: none;
  flex: 0 0 0px;
  height: 0;
  padding: 0;
  margin: 0;
}

#view-chat {
  position: relative;
}

@media (max-width: 1023px) {
  #view-chat:has(#messages:empty) #top-download-bar,
  #view-chat:not(:has(#messages .msg)) #top-download-bar {
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    z-index: 10;
    width: 100%;
    box-sizing: border-box;
  }
}

#empty-state,
#empty-hero-logo,
#studio-hero-logo,
.empty-brand,
.studio-welcome-title {
  animation: none;
  transform: none;
  transition: none;
}

#rawoke-composer-bar {
  display: none;
}

#btn-quick-slide.rawoke-composer-toggle[hidden] {
  display: none;
}

#btn-quick-slide.rawoke-composer-toggle:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--rg-text);
  color: var(--rg-bg);
  border: 1px solid var(--rg-text);
  font-size: 12px;
  font-weight: 600;
}

#btn-quick-slide.rawoke-composer-toggle:not([hidden])::after {
  content: "×";
  font-size: 14px;
  line-height: 1;
  opacity: 0.78;
  margin-left: 2px;
}

@media (min-width: 860px) {
  #view-chat #composer,
  #view-chat:has(#messages:empty) #composer,
  body.studio-page #composer,
  body.studio-page .studio-app:not(.is-active) #composer {
    width: min(560px, calc(100% - 88px));
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }

  body.studio-page .studio-app:not(.is-active) #composer {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    padding: 0;
  }

  body.studio-page .studio-app.is-active #composer {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: auto;
  }

  #view-chat .top-download-bar,
  #view-chat:has(#messages:empty) .top-download-bar,
  #view-chat:has(#messages:empty) .chat-inspiration-grid,
  body.studio-page .studio-app:not(.is-active) .inspiration-cards {
    width: min(560px, calc(100% - 88px));
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }

  #app.split #view-chat #composer,
  body.studio-page .studio-app.is-split:not(.is-canvas-hidden) #composer {
    width: min(500px, calc(100% - 40px));
    max-width: 500px;
  }
}

@media (min-width: 1024px) {
  #view-chat.with-cowork #composer {
    right: 50%;
    width: min(500px, calc(50% - 48px));
    max-width: 500px;
  }
}

#btn-stop {
  display: none;
}

#btn-stop.active,
body.is-generating #btn-stop {
  display: flex;
}

body.is-generating #btn-send,
body.is-generating #btn-voice-input,
body.auth-gate #sidebar,
body.auth-gate #topbar,
body.auth-gate #top-download-bar,
.studio-app.is-active .inspiration-cards,
.studio-app.is-active #empty-state,
#view-chat.pane-canvas #messages,
#view-chat.pane-canvas #empty-state,
#view-chat.pane-canvas #top-download-bar,
#view-chat.pane-canvas #chat-inspiration,
#view-chat.pane-chat #cowork-editor,
#view-chat.pane-chat .cowork-bar,
#model-status,
#model-status.active {
  display: none;
}

#artifact-head {
  flex-wrap: nowrap;
  gap: 8px;
}

#artifact-head strong {
  flex: 1 1 0%;
  min-width: 0;
}

#artifact-export,
#artifact-close,
#artifact-run,
#artifact-version {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.rawoke-spec-seg .rawoke-quick-chip {
  background: transparent;
  border-color: transparent;
  color: var(--rg-muted);
}

.rawoke-stage-toolbar .rawoke-quick-chip.on,
.rawoke-spec-seg .rawoke-quick-chip.on {
  background: var(--rg-text);
  color: var(--rg-bg);
  border-color: var(--rg-text);
  font-weight: 650;
  box-shadow: 0 1px 3px rgba(15, 20, 28, 0.14);
}
@media (max-width: 480px) {
  .rawoke-spec-seg .rawoke-quick-chip {
    padding: 5px 4px;
    font-size: 11px;
    letter-spacing: -0.015em;
    min-width: 0;
  }
  .doc-tools button {
    flex: 1 1 auto;
    padding: 4px 5px;
    font-size: 10.5px;
    letter-spacing: -0.01em;
    min-width: 0;
  }
}

.rawoke-stage-meta .rawoke-verify-badge {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 0;
  border-radius: 6px;
  border: none;
  background: transparent;
  padding: 2px 4px;
  font-size: 11px;
  color: var(--rg-muted);
  white-space: normal;
  overflow: visible;
}

.artifact-card-actions button {
  background: var(--rg-surface-2);
  color: var(--rg-text);
  border: 1px solid var(--rg-line);
}

.artifact-card-actions button:last-child {
  background: var(--rg-text);
  color: var(--rg-bg);
  border-color: var(--rg-text);
}

.msg.ai > .msg-meta .msg-more-btn {
  display: none;
}

#artifact-filters button.is-empty-filter:not(.on) {
  opacity: 0.62;
}

#toast {
  background: var(--rg-text);
  color: var(--rg-bg);
  border: 1px solid var(--rg-line);
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(15, 20, 28, 0.2);
  z-index: 9999;
}

#model-status,
#model-status.active {
  display: none;
}


@media (min-width: 860px) {
  #app .settings-page,
  body .settings-page {
    max-width: 960px;
    padding: 40px 48px 64px;
  }

  body #app .settings-header #btn-back,
  body #app .settings-header #project-back,
  body #app .settings-header #connect-back,
  body #app .settings-header #artifact-page-back,
  body #app .settings-header #coll-back {
    display: none;
  }

  body #app #view-settings:has(#settings-content:not([hidden])) .settings-header #btn-back {
    display: inline-flex;
  }

  body #sheet-backdrop,
  body .sheet-backdrop,
  body .sheet-backdrop.show {
    z-index: 70;
  }
}

@media (max-width: 859px) {
  #app .settings-page,
  body .settings-page {
    padding: 0 16px 32px;
  }
}

.msg.user:has(.msg-user-bubble),
.msg.user:has(.msg-attach-list),
:root[data-theme='light'] .msg.user:has(.msg-user-bubble),
:root[data-theme='light'] .msg.user:has(.msg-attach-list),
:root[data-theme='dark'] .msg.user:has(.msg-user-bubble),
:root[data-theme='dark'] .msg.user:has(.msg-attach-list),
body.studio-page .msg.user:has(.msg-user-bubble),
body.studio-page .msg.user:has(.msg-attach-list) {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

:is(#_rg_a, [hidden]):is(#_rg_b, [hidden])[hidden] {
  display: none;
}

.pin-dialog-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.pin-dialog-actions .auth-submit {
  flex: 1 1 0%;
}

.pin-dialog-actions .auth-submit.pin-btn-cancel {
  background: var(--rg-surface-2);
  color: var(--rg-text);
  border: 1px solid var(--rg-line);
}

#thread-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 16px 8px;
  font-size: 12px;
  color: var(--rg-muted);
  border-bottom: 1px solid var(--rg-line, rgba(0,0,0,.08));
  white-space: nowrap;
  overflow: hidden;
}

#thread-bar[hidden] {
  display: none;
}

.thread-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
}

.thread-bar-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--rg-border, rgba(15, 23, 42, 0.14));
  border-radius: 999px;
  background: var(--rg-surface-2, rgba(15, 23, 42, 0.05));
  color: var(--rg-text, #0f172a);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.project-active-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.project-deactivate-btn {
  background: transparent;
  color: var(--rg-text, #0f172a);
  border: 1px solid var(--rg-border, rgba(15, 23, 42, 0.18));
}


@media (max-width: 1023px) {
  #view-chat:has(#thread-bar:not([hidden])) #top-download-bar {
    top: 44px;
  }
}

@media (min-width: 800px) {
  #app.split {
    display: flex;
    flex-direction: row;
    align-items: stretch;
  }
  #app.split #view-chat {
    width: 50%;
    flex: 1 1 50%;
    min-width: 0;
  }
  #artifact-panel.open {
    width: 50%;
    flex: 1 1 50%;
    min-width: 0;
    height: 100%;
    border-left: 1px solid var(--rg-line);
  }
}

body.studio-page #studio-inspiration,
body.studio-page .studio-app .inspiration-cards,
body.studio-page .studio-app:not(.is-active) .inspiration-cards {
  display: none;
}
}
