.app-shell {
  flex-grow: 1;
  min-width: 0;
  --app-shell-header-bg: var(--color-water-blue-800);
}
.app-shell--padding {
  padding-inline: 1rem;

  @media (min-width: 48rem) {
    padding-inline: 2rem;
  }
}
.app-shell__header-background {
  position: relative;
  padding-block-start: 2rem;
  background-color: var(--app-shell-header-bg);
  margin-bottom: calc(2rem + 3vw);
  color: var(--color-water-blue-50);

  &::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    box-shadow: 0 -1px 0 var(--app-shell-header-bg);
    border-right: 100vw solid transparent;
    border-top: 3vw solid hsl(from var(--app-shell-header-bg) h calc(s * 0.9) 90%);
    border-top: 3vw solid var(--app-shell-header-bg);
  }

  .app-shell--overlap & {
    padding-block-end: 5rem;
  }
}
.app-shell__header {
  display: flex;
  flex-direction: column;
  align-items: start;
  margin: 0 auto;
}
.app-shell__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
}

.app-shell__topline {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-water-blue-50);
  margin-bottom: 1rem;
}

.app-shell__user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-shell__auth {
  color: var(--color-water-blue-200);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s;

  &:hover {
    color: var(--color-water-blue-50);
  }
}

.app-shell__back-btn {
  margin-inline: -1rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;

  &:hover {
    outline: none;
    background: color-mix(var(--color-white) 20%, transparent);
  }
  &:focus {
    outline: 2px solid currentColor;
    outline-offset: 0;
  }
  &:active {
    background: color-mix(var(--color-white) 15%, transparent);
  }
}

.app-shell__title {
  margin: 0;
  color: var(--color-water-blue-50);
  font-size: 2.25rem;
  padding-block-end: 0.5rem;
}

.app-shell__subtitle {
  font-size: 1rem;
  color: var(--color-water-blue-200);
  margin: 0.25rem 0 0 0;
  line-height: 1.4;
  text-wrap: balance;
}

.app-shell__main {
  position: relative;
  width: 100%;
  margin: 0 auto;
  padding-block-end: 2rem;

  .app-shell--overlap & {
    margin-top: -6rem;
  }
}
