* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--spt-ink);
  font-family: var(--spt-font-sans);
  background: var(--spt-workspace);
}

button {
  font: inherit;
}

.spt-app-shell {
  display: grid;
  grid-template-rows: minmax(var(--spt-header-height), auto) minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  min-width: 320px;
  background: var(--spt-workspace);
}

.spt-header {
  position: relative;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(0, auto) auto minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  min-width: 0;
  min-height: var(--spt-header-height);
  padding: 0 22px;
  background: var(--spt-header-bg);
  border-bottom: 1px solid var(--spt-border-strong);
}

.spt-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  flex: 0 1 auto;
}

.spt-brand__logo {
  width: var(--spt-icon-size);
  height: var(--spt-icon-size);
  object-fit: contain;
  flex: 0 0 auto;
}

.spt-brand__name {
  overflow: hidden;
  color: var(--spt-ink);
  font-size: 19px;
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spt-menu-bar {
  display: flex;
  align-items: center;
  align-self: stretch;
  min-width: 0;
}

.spt-menu {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.spt-menu__button {
  height: var(--spt-control-height);
  min-width: 56px;
  padding: 0 14px;
  color: var(--spt-ink-soft);
  font-size: 14px;
  font-weight: 400;
  line-height: var(--spt-control-height);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--spt-radius);
  cursor: default;
}

.spt-menu__button:hover,
.spt-menu__button[aria-expanded="true"] {
  color: var(--spt-ink);
  background: var(--spt-menu-hover);
  border-color: var(--spt-border);
}

.spt-menu__panel {
  position: absolute;
  top: calc(50% + 17px);
  left: 0;
  z-index: 90;
  width: 176px;
  padding: 6px;
  background: var(--spt-surface-raised);
  border: 1px solid var(--spt-border-strong);
  border-radius: var(--spt-radius);
  box-shadow: var(--spt-shadow-soft);
}

.spt-menu__item {
  display: block;
  width: 100%;
  height: 28px;
  padding: 0 10px;
  color: var(--spt-ink);
  font-size: 13px;
  font-weight: 400;
  line-height: 28px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 3px;
  cursor: default;
}

.spt-menu__item:hover {
  background: var(--spt-menu-hover);
}

.spt-menu__button:focus-visible,
.spt-menu__item:focus-visible {
  outline: 2px solid var(--spt-focus);
  outline-offset: 2px;
}

.spt-header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.spt-header-tools:empty {
  display: none;
}

.spt-workspace {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--spt-workspace);
}

.spt-workspace__surface {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 28px;
  place-items: center;
}

.spt-window-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

@media (max-width: 520px) {
  .spt-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 16px;
    padding: 10px 14px;
  }

  .spt-brand__name {
    max-width: 190px;
    font-size: 17px;
  }

  .spt-menu__panel {
    left: auto;
    right: 0;
  }

  .spt-header-tools {
    grid-column: 1 / -1;
  }

  .spt-workspace__surface {
    padding: 14px;
    place-items: end center;
  }
}
