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

:root {
  --theme-bg: #000000;
  --theme-text: #e8eaef;
  --theme-muted: #9aa0a6;
  --theme-accent: #c4b5fd;
  --theme-accent-hot: #a78bfa;
  --theme-surface: #0d0d0d;
  --theme-elevated: #141414;
  --theme-border: #2a2a2a;
  --theme-accent-soft: rgba(167, 139, 250, 0.12);
  --theme-accent-soft-08: rgba(167, 139, 250, 0.08);
  --theme-accent-soft-20: rgba(167, 139, 250, 0.2);
}

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "DM Sans", sans-serif;
  background: var(--theme-bg, #000000);
  color: var(--theme-text, #e8eaef);
}

.browser-frame {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
}

.browser-stack {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
}

.shell {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  background: var(--theme-bg, #000000);
  border-bottom: 1px solid #1a1a1a;
}

.tabs-row {
  display: flex;
  align-items: flex-end;
  gap: 0;
  padding: 0;
  background: var(--theme-bg, #000000);
  min-width: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    max-height 0.22s ease,
    opacity 0.16s ease;
}

.browser-frame.searching .tabs-row {
  max-height: 52px;
  opacity: 1;
  pointer-events: auto;
  overflow-x: hidden;
}

.tab-bar.tab-bar--embed {
  flex: 1;
  min-width: 0;
  width: 100%;
  border-radius: 0;
  overflow-x: hidden;
  overflow-y: hidden;
}

.tab-bar--embed .tab-bar-new-tab {
  position: absolute;
  z-index: 12;
  left: 0;
  right: auto;
  bottom: 11px;
  margin: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-bar--embed .tab-drag-handle {
  pointer-events: none;
}

.tab-bar.tab-bar--sorting .tab.tab--dragging {
  z-index: 24;
  opacity: 0.92;
}

body.tab-layout-vertical {
  flex-direction: row;
}

body.tab-layout-vertical .browser-frame {
  flex-direction: row;
  flex: 1;
  min-width: 0;
  height: 100%;
  align-items: stretch;
}

body.tab-layout-vertical .browser-stack {
  flex: 1;
  min-width: 0;
}

body.tab-layout-vertical .tabs-row {
  width: 260px;
  flex-shrink: 0;
  align-self: stretch;
  height: 100%;
  min-height: 0;
  align-items: stretch;
  max-height: none;
  opacity: 1;
  pointer-events: auto;
  overflow: hidden;
  border-right: 1px solid var(--theme-border, #2a2a2a);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--theme-surface, #0d0d0d) 94%, var(--theme-bg, #000)) 0%,
    var(--theme-bg, #000) 100%
  );
}

body.tab-layout-vertical .shell {
  border-bottom: 1px solid #1a1a1a;
}

body.tab-layout-vertical .tab-bar.tab-bar--embed.tab-bar--vertical {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  width: 100%;
  padding: 10px 8px 8px;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

body.tab-layout-vertical .tab-bar--vertical .tab-bar-content {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--theme-border, #2a2a2a) transparent;
}

body.tab-layout-vertical .tab-bar--vertical .tab {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  height: auto;
  min-height: 40px;
  margin: 0;
  transform: none;
  pointer-events: auto;
  z-index: 1;
}

body.tab-layout-vertical .tab-bar--vertical .tab .tab-dividers,
body.tab-layout-vertical .tab-bar--vertical .tab .tab-bg {
  display: none;
}

body.tab-layout-vertical .tab-bar--vertical .tab .tab-content {
  position: relative;
  inset: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: auto;
  min-height: 40px;
  padding: 8px 10px 8px 12px;
  margin: 0;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

body.tab-layout-vertical .tab-bar--vertical .tab:not([active]):hover .tab-content {
  background: var(--theme-accent-soft-08, rgba(167, 139, 250, 0.08));
}

body.tab-layout-vertical .tab-bar--vertical .tab[active] .tab-content {
  background: color-mix(in srgb, var(--theme-elevated, #141414) 88%, var(--theme-accent-soft, rgba(167, 139, 250, 0.12)));
  border-color: color-mix(in srgb, var(--theme-border, #2a2a2a) 70%, var(--theme-accent-hot, #a78bfa));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--theme-accent, #c4b5fd) 12%, transparent);
}

body.tab-layout-vertical .tab-bar--vertical .tab[active] .tab-content::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 3px;
  height: 16px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-text, #e8eaed) 42%, transparent);
}

body.tab-layout-vertical .tab-bar--vertical .tab .tab-favicon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 8px;
  background-color: var(--theme-accent-soft, rgba(167, 139, 250, 0.12));
  background-size: cover;
  background-position: center;
}

body.tab-layout-vertical .tab-bar--vertical .tab .tab-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--theme-muted, #9aa0a6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.tab-layout-vertical .tab-bar--vertical .tab[active] .tab-title {
  color: var(--theme-text, #e8eaed);
}

body.tab-layout-vertical .tab-bar--vertical .tab .tab-close {
  position: relative;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  opacity: 0;
  border-radius: 8px;
  transition: opacity 0.12s ease, background 0.12s ease;
}

body.tab-layout-vertical .tab-bar--vertical .tab:hover .tab-close,
body.tab-layout-vertical .tab-bar--vertical .tab[active] .tab-close {
  opacity: 1;
}

body.tab-layout-vertical .tab-bar--vertical .tab .tab-drag-handle {
  display: none;
}

body.tab-layout-vertical .tab-bar--vertical .tab-bar-bottom {
  display: none;
}

body.tab-layout-vertical .tab-bar--vertical .tab-bar-new-tab {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  top: auto;
  flex-shrink: 0;
  width: 100%;
  height: 34px;
  margin: 6px 0 0;
  border-radius: 10px;
  border: 1px dashed color-mix(in srgb, var(--theme-border, #2a2a2a) 85%, var(--theme-accent, #c4b5fd));
  background: transparent;
  color: var(--theme-muted, #9aa0a6);
  font-size: 18px;
  line-height: 1;
}

body.tab-layout-vertical .tab-bar--vertical .tab-bar-new-tab:hover {
  border-color: var(--theme-accent-hot, #a78bfa);
  background: var(--theme-accent-soft-08, rgba(167, 139, 250, 0.08));
  color: var(--theme-text, #e8eaed);
}

.nav-btns {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--theme-muted, #9aa0a6);
  cursor: pointer;
}

.nav-btn:hover {
  background: var(--theme-accent-soft-08, rgba(167, 139, 250, 0.08));
  color: var(--theme-text, #e8eaed);
}

.nav-btn:active {
  background: #262626;
}

.new-tab {
  flex-shrink: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--theme-muted, #9aa0a6);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.new-tab:hover {
  background: var(--theme-accent-soft, rgba(167, 139, 250, 0.12));
  color: var(--theme-accent, #c4b5fd);
}

.omnibar {
  display: flex;
  gap: 8px;
  padding: 8px 10px 10px;
  align-items: center;
  background: var(--theme-bg, #000000);
  position: relative;
  z-index: 5;
}

.omnibar-field {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--theme-border, #2a2a2a);
  border-radius: 10px;
  background: var(--theme-surface, #0d0d0d);
  transition: border-color 0.12s ease;
}

.omnibar-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 120;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  max-height: min(320px, 50vh);
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid var(--theme-border, #2a2a2a);
  background: var(--theme-elevated, #141414);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.omnibar-suggestions[hidden] {
  display: none !important;
}

.omnibar-suggestion {
  padding: 8px 14px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--theme-text, #e8eaef);
  cursor: default;
  user-select: none;
}

.omnibar-suggestion[aria-selected="true"] {
  background: var(--theme-accent-soft, rgba(167, 139, 250, 0.14));
  color: var(--theme-accent, #c4b5fd);
}

.omnibar-field:focus-within {
  border-color: #404040;
}

.omnibar .search {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--theme-text, #e8eaef);
  font-size: 14px;
}

.omnibar .search:focus {
  outline: none;
}

.omnibar-extensions-btn {
  flex-shrink: 0;
  align-self: center;
}

.omnibar-menu {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  align-self: center;
}

.omnibar-menu-trigger {
  border-radius: 8px;
}

.omnibar-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 11rem;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--theme-border, #2a2a2a);
  background: var(--theme-elevated, #141414);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  z-index: 50;
}

.omnibar-menu-panel[hidden] {
  display: none !important;
}

.omnibar-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--theme-text, #e8eaed);
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

.omnibar-menu-icon {
  flex-shrink: 0;
  opacity: 0.9;
}

.omnibar-menu-hint {
  margin-left: auto;
  font-size: 11px;
  color: var(--theme-muted, #9aa0a6);
  opacity: 0.9;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.omnibar-menu-item:hover {
  background: var(--theme-accent-soft, rgba(167, 139, 250, 0.12));
  color: var(--theme-accent, #c4b5fd);
}

.omnibar-menu-item:hover .omnibar-menu-icon {
  opacity: 1;
}

.omnibar-menu-item:active {
  background: var(--theme-accent-soft-20, rgba(167, 139, 250, 0.2));
}

.rosin-shortcuts-dlg {
  margin: auto;
  width: min(720px, calc(100vw - 32px));
  max-height: min(85vh, 480px);
  padding: 22px 24px 20px;
  border: 1px solid var(--theme-border, #2a2a2a);
  border-radius: 14px;
  background: var(--theme-surface, #0d0d0d);
  color: var(--theme-text, #e8eaed);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.rosin-shortcuts-dlg::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.rosin-shortcuts-dlg.is-customizing .rosin-shortcuts-lead {
  color: var(--theme-accent, #c4b5fd);
}

.rosin-shortcuts-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
}

.rosin-shortcuts-icon {
  flex-shrink: 0;
  color: var(--theme-accent, #c4b5fd);
}

.rosin-shortcuts-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

.rosin-shortcuts-lead {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--theme-muted, #9aa0a6);
}

.rosin-shortcuts-list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: min(42vh, 280px);
  overflow-y: auto;
}

@media (max-width: 520px) {
  .rosin-shortcuts-list {
    grid-template-columns: 1fr;
  }
}

.rosin-shortcuts-list li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--theme-border, #2a2a2a);
  background: var(--theme-elevated, #141414);
  font-size: 14px;
  min-height: 4.25rem;
}

.rosin-shortcuts-label {
  color: var(--theme-text, #e8eaed);
  font-weight: 500;
}

.rosin-shortcuts-keys {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  flex-shrink: 0;
}

.rosin-shortcuts-plus {
  color: var(--theme-muted, #9aa0a6);
  font-size: 11px;
  user-select: none;
}

.rosin-shortcuts-keys kbd {
  display: inline-block;
  min-width: 1.25rem;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--theme-border, #2a2a2a);
  background: var(--theme-surface, #0d0d0d);
  color: var(--theme-text, #e8eaed);
  font-size: 11px;
  font-family: ui-monospace, Consolas, monospace;
  line-height: 1.35;
}

.rosin-shortcut-bind {
  font: inherit;
  font-size: 12px;
  font-family: ui-monospace, Consolas, monospace;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--theme-border, #2a2a2a);
  background: var(--theme-surface, #0d0d0d);
  color: var(--theme-accent, #c4b5fd);
  cursor: pointer;
  width: 100%;
  max-width: none;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rosin-shortcut-bind:hover {
  border-color: var(--theme-accent-hot, #a78bfa);
  background: var(--theme-accent-soft-08, rgba(167, 139, 250, 0.08));
}

.rosin-shortcut-bind.is-recording {
  border-color: var(--theme-accent-hot, #a78bfa);
  box-shadow: 0 0 0 2px var(--theme-accent-soft-20, rgba(167, 139, 250, 0.2));
  color: var(--theme-text, #e8eaed);
  animation: shortcut-pulse 1s ease-in-out infinite;
}

.rosin-shortcut-bind.has-error {
  border-color: #f87171;
  color: #fca5a5;
}

@keyframes shortcut-pulse {
  50% {
    opacity: 0.65;
  }
}

.rosin-shortcuts-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.rosin-shortcuts-btn {
  flex: 1 1 auto;
  min-width: 7rem;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--theme-border, #2a2a2a);
  background: var(--theme-accent-soft, rgba(167, 139, 250, 0.12));
  color: var(--theme-text, #e8eaed);
  cursor: pointer;
}

.rosin-shortcuts-btn:hover {
  border-color: var(--theme-accent-hot, #a78bfa);
  background: var(--theme-accent-soft-20, rgba(167, 139, 250, 0.2));
}

.rosin-shortcuts-btn--ghost {
  background: transparent;
  font-weight: 500;
  color: var(--theme-muted, #9aa0a6);
}

.rosin-shortcuts-btn--ghost:hover {
  color: var(--theme-text, #e8eaed);
}

.iframe-stack {
  flex: 1;
  position: relative;
  min-height: 0;
  min-width: 0;
  width: 100%;
  background: var(--theme-bg, #000);
}

.tab-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: none;
}

.tab-iframe.visible {
  display: block;
}

body {
  display: flex;
  flex-direction: column;
}

.rosin-socials-dlg {
  margin: auto;
  max-width: min(380px, calc(100vw - 32px));
  padding: 22px 22px 18px;
  border: 1px solid var(--theme-border, #2a2a2a);
  border-radius: 14px;
  background: var(--theme-surface, #0d0d0d);
  color: var(--theme-text, #e8eaef);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
}

.rosin-socials-dlg::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.rosin-socials-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.rosin-socials-title svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: currentColor;
}

.rosin-socials-lead {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--theme-muted, #9aa0a6);
}

.rosin-socials-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rosin-socials-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--theme-border, #2a2a2a);
  background: var(--theme-elevated, #141414);
  color: var(--theme-accent, #c4b5fd);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}

.rosin-socials-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.rosin-socials-link:hover {
  border-color: var(--theme-accent-hot, #a78bfa);
  background: var(--theme-accent-soft-08, rgba(167, 139, 250, 0.08));
  box-shadow: 0 0 12px var(--theme-accent-soft-20, rgba(167, 139, 250, 0.2));
}

.rosin-socials-close {
  width: 100%;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--theme-border, #2a2a2a);
  background: var(--theme-accent-soft, rgba(167, 139, 250, 0.12));
  color: var(--theme-text, #e8eaef);
  cursor: pointer;
}

.rosin-socials-close:hover {
  border-color: var(--theme-accent, #c4b5fd);
}

.rosin-socials-close:focus-visible {
  outline: 2px solid var(--theme-accent, #c4b5fd);
  outline-offset: 2px;
}

.rosin-transport-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 4px;
}

.rosin-transport-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-width: 120px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--theme-border, #2a2a2a);
  background: var(--theme-accent-soft, rgba(167, 139, 250, 0.12));
  color: var(--theme-text, #e8eaef);
  cursor: pointer;
}

.rosin-transport-opt svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
}

.rosin-transport-opt:hover {
  border-color: var(--theme-accent, #c4b5fd);
}

.rosin-theme-actions .rosin-transport-opt {
  flex: 1 1 calc(50% - 5px);
  min-width: 110px;
}

.rosin-discord-actions {
  margin: 0 0 14px;
}

.rosin-discord-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(88, 101, 242, 0.15);
  padding: 2px;
  box-sizing: border-box;
}
